Hello everybody, i have a problem with switch. When I turn on icon, it still come back to position 0 after 5sec. I have no errors in log and request send succefull becouse output is on. When I click icon during this 5 sec, command_off request send succefully too, becouse output is off. What I must do to work it correctly? And is it posible icon automaticly refresh actual state of output when it trun on/off out from home assistant interface? Device is eaton easy e4 and i want communicate it via json API. Thats my code
Deja Vu… This was my first question when I joined this forum a 5 years ago. (Wow, I’ve been pestering people for a long time…)
I can tell you why, not how to fix it.
Home Assistant is not getting a state update from your device.
Also the result of your value_template is an icon. This is not correct. The value template must resolve to true or false to indicate the state of the switch, true = on, false = off. The switch integration will then change the state of the switch toggle (this is not the icon, the icon is on the left).
Perhaps true in some cases, but I had the same issue with an input_boolean. (And other)
In my case it was a custom card or custom ui (not updated) that was the problem.
Just wanted to open up for other reasons, not saying you are wrong.
If it’s only this entity then I agree with you Stephen but if it happens to more entities then it’s probably something else.