Home automation is adictive…once you have your first device installed, it’s a slipery slope. You will start integrating everything, and since there is so much diversity of devices in your house, you will need a bunch of sensors and actuators.
This is a standard box that I am placing on every room of the house to have a baseline of capabilities:
create a new ESPHome device, I called this one garage_toolbox.
Edit the esphome garage_toolbox.yaml file so it looks like this:
substitutions:upper_devicename:Garage Toolboxesphome:name:garage_toolboxplatform:ESP8266board:d1_miniwifi:ssid:"REPLACE_ME"password:"REPLACE_ME"domain:".your_local_domain"fast_connect:true# sync the time from Home Assistant time:-platform:homeassistantid:homeassistant_time# Enable logginglogger:web_server:port:80# Enable Home Assistant APIapi:password:"REPLACE_ME"ota:password:"REPLACE_ME"# show status using the built in LEDstatus_led:pin:number:GPIO2inverted:True# https://esphome.io/components/i2c.html#i2c# you need to enable i2c before using any devicesi2c:sda:14# D5scl:12# D6scan:Truesensor:-platform:wifi_signalname:"${upper_devicename}WiFisignal"update_interval:60saccuracy_decimals:0-platform:uptimename:"${upper_devicename}uptime"accuracy_decimals:0# https://esphome.io/components/sensor/tsl2561.html-platform:tsl2561name:"${upper_devicename}AmbientLight"address:0x39update_interval:60saccuracy_decimals:0# https://esphome.io/components/sensor/dht.html-platform:dhtpin:D7model:AM2302temperature:name:"${upper_devicename}Temperature"accuracy_decimals:0humidity:name:"${upper_devicename}Humidity"accuracy_decimals:0update_interval:60sbinary_sensor:# rcwl-0516-platform:gpiopin:D1name:"${upper_devicename}Motionsensor"device_class:motion
Compile, download the binary and flash ESPHome (again, there is plenty of tutorials about this out there)
After flashing the ESPhome image the micontroller will restart and connect to the wifi.
home assistant configuration
the autodiscovery should take care of finding the new ESPHome device, go to Integrations and you should be able to add it from there.