Relative noob here - while I’m a professional with 37 years of embedded software development experience, I’m quite new to using Home Assistant and ESPHome. While I have several ESPHome projects working, I don’t have a lot of experience with HA or ESPHome.
I’m running into an issue with a couple recent projects: they include a status_led or status_light output, and some of them are frequently flashing, while most are only flashing when unable to connect to the Home Assistant server, as expected. For the problematic projects, as long as I have the node’s Logs window open, the status_led is off, but when I close the log, it starts flashing again.
I can’t figure out WHY some of my projects are flashing when I don’t have the log window open. It’s probably something stupid I’ve done in the configuration, but I don’t see it.
In an effort to figure it out, I created a simple project and added a sensor that reports App.get_app_state() which reports:
- 2 when the Logs window is open (status_led is off)
- 258 when the Logs window is closed (status_led is flashing slowly)
The node is connected to WiFi, it shows up in Home Assistant, and is connected to the MQTT broker - the status value updates in HA and I can see MQTT updates from the node. Nothing in the node’s log output jumps out at me that might explain the warning.
So, the status_led (and also status_light) output is properly showing the status, but WHY is the 256 bit being set? How can I figure this out?
Configuration of my simplified test node that exhibits this behavior:
esphome:
name: test
platform: ESP32
board: nodemcu-32s
debug:
wifi:
ssid: !secret iot_ssid
password: !secret iot_password
fast_connect: true
# Enable logging
logger:
# Enable Home Assistant API
api:
password: !secret fallback_password
ota:
password: !secret fallback_password
web_server:
port: 80
mqtt:
broker: !secret mqtt_broker
username: !secret mqtt_user
password: !secret mqtt_pass
# System status LED
status_led:
pin: GPIO16
sensor:
- platform: template
name: test status text
id: uptime_human
lambda: |-
return App.get_app_state();
update_interval: 5s