I have an esphome entity representing an indicator LED. It is of course reflected in HA.
This LED reflects availability of AC for a home device. It is updated by another esphome module connected to the device.
So, all is fine and dandy and works as it should, UNTIL the esp controlling the indicator LED loses power or otherwise disconnects. Upon its restart, the LED indicator does not resynchronize to the value in home assistant.
How do I force this synchronization on startup (or re-connect) ?
And this is the second part (which activates the Led via a HA/nodered automation) – this is a macro called from another yaml from a different esphome —
I would skip ha/nodered automation for this task completely and just use the native home assistant “import function” on the second esphome node
This should be mitigated as well by the default behavior. Guess beside on and off their might also be an unavailable which could be used to blink the led for example to identify malfunction
Unfortunately, use of home assistant sensors does not seem to mitigate the problem. It seems they do not update their counterparts when the esphome node reboots.
There are awkward workarounds using on_client_connected or using heartbeat indicators, but in the end, I think it should be expected that reflected entities will synchronize when one of the 2 sides restarts. Or perhaps I missed something.
FYI, its really frustrating when someone posts a question and then decides which parts of config or which details are pertinent information. If your here asking for help then you definitely dont know which information is pertinent or not. Even if you 100% know it isn’t related, you need to include it anyway. Its easier to help you if we can see what your doing or what your trying to do and if its not relevant the people taking their time to help you, they can decide if it is or isnt pertinent. People will either decide its not relevant and move on or it is relevant and now they can help you and you never know, maybe someone can off you tips on improving it.
When you do this, its like trying to read a book with 2 chapters missing. Things dont make sense and instead of having answers for you, now people have questions for you, like I do.
Please just provide all information whether you think its relevant or not.
We cant see any of the automations/actions that control the lights. What are you using to determine “availability of AC”? The purpose of second config/esp board, its essentially a generic template with a file included. Where is the condig for the file? What does this file do? I could probably look at your config and answer most of this but, you decided it wasnt relevant for me to know…
Also,
Is 100% right. Theres no reason to be mixing such a simple automation up between Esphome, HA, and NodeRed. Your significantly increasing the complexity which you dont need to do and increasing the risk of a failure. Now if either of those 3 have a problem your automation wont run. Ideally, you want to keep everything in esphome or esphome w/HA, especially for such simple tasks. Your much less likely to have little problems that cause huge problems down the line.
Please post ALL your config and maybe briefly explain what each switch/sensor is for or its purpose. We need information and details to help you. Without them, rhe best your going to get is a bunch of people theowing out guesses and wasting your time.
Yes, this is a momentary switch wired in parallel with a hardwired device-mounted momentary switch which turns on and off the device. The device state is only knowable by sensing AC via a optocoupler
In your configuration, what happens if the float switch triggers while the first node is temporarily unpowered and then reboots while the float switch is still on