Does the native API offer anything equivalent to setting a LWT with MQTT, i.e., a state to monitor, a message or something to trigger an action when a device disappears from the network ungracefully?
I assume that I could set a trigger based on an entity changing to state “unavailable” in HA, but I’m wondering if there is a option using the esphome API.
I am trying to use this internally with an id, should it return false if ha is not connected to the ESP? i need to perform relay toggle in case ha is not available.
Looks for me like is always on, internally i mean even if ha is down.
Yes current behavior is always on For ESPHome api. Next version will work as expected and also a new property in api component will allow for easy api online checks