Hello,
I have a ESPhome powerd light, which is connected to a switchable power socket.
When the powersocket is turned off, the esp light is marked as unavailable in HomeAssistant, and I cannot “control” it. That is basically not wrong but unfortunately bad in my situation
What I want to do:
I want to be able to “control” the esp light even if it is not power up and not available. I want to catch the event, power on the socket and reply the initial event to get proper light settings.
I do the same for my zigbee devices (zigbee2mqtt), where this is perfectly working.
I have power sockets which I can turn on and off. There are various triggers for this (leaving home, specific timeslots, etc.), so it can happen that a power socket is turned off, when I want to turn on something, which is connected to it, for instance a zigbee light. In home assistant I can still power on, adjust brightness, etc. on zigbee lights, even if they are not connected to the zigbee network (because they have not power, because power socket is turned off). This itself will of course not do anything (because of no power), but when adjusting such a light (not poweder on) I fetch the event in home assistant, power on the related power socket and send again the light.turn_on (I do this in an appdaemon app). So I can control the light via the home assistant light entity, even if the power socket is turned off. I simply do not need to care about it, because appdaemon turns power socket on for me.
I wanted to do the same with my esphome light, but the esphome light entity gets the status unavailable in home assistant and i cannot control (turn on/off, adjust brightness) in the home assistant dashboard for it. so there is no event I can catch.
For the sake of completness: With esphome light component I mean a simple esp8266 doing some pwm via a mosfet for leds. This thing is working fine.
The only reason you can do this with zigbee is that there is a setting in both ZHA & Z2M which only marks mains powered devices as unavailable after some time has passed (default is 10 mins for Z2M and 2 hours for ZHA).
If you’re asking for the same setting to be applied to ESPHome, then a feature request would be the way forward.