I have below “code” for an ESPHOME device for now. I run my device on a battery and solar and would like to make it as power efficient as possible. There I would like to keep the uptime of the esp32 as small as possible to that I can enter deep sleep again as fast as possible, hence an automation that forces read of temperature and battery voltage and then asks the esp32 to enter deep sleep again. With my current setup I see that it is not always reading a temperature on boot and therefore I have currently set uptime to 90 secs before going to deep sleep (60 turned out not to be enough).
As well, if any suggestions on how to power optimize, please let me know (I do e.g. need to turn off the onboard power led, I think I know how to do that).
I’m completely new to ESPHOME, so hope you can help with some descriptive guidance.
esphome: name: altan platform: ESP32 board: esp-wrover-kit wifi: ssid: !secret wifi_iot_ssid password: !secret wifi_iot_pass # Optional manual IP manual_ip: static_ip: 10.0.30.50 gateway: 10.0.0.1 subnet: 255.255.255.0 # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "Altan Fallback Hotspot" password: !secret esphome_fallback_hotspot captive_portal: # Enable logging logger: # Enable Home Assistant API api: password: !secret esphome_oat_pass ota: password: !secret esphome_oat_pass #Deep sleep deep_sleep: run_duration: 90s sleep_duration: 30min id: deep_sleep_1 # Dallas sensor/hub component (in my case for the DS18B20 Waterproof Digital Temperature Temp Sensor Probe) dallas: - pin: GPIO4 sensor: - platform: dallas address: 0x5E02131E08F5AA28 name: "Temperatur - Altan" id: dallas_temp_1 - platform: adc pin: 39 name: "Battery Voltage - Altan" update_interval: 20s attenuation: 2.5db accuracy_decimals: 1 id: battery_voltage_1 filters: - multiply: 4.268367
Thanks in advance. KR