Update tellduslive state in actuator methods#21705
Conversation
|
@MartinHjelmare could this make 0.89? |
|
Ok, I've added it to 0.89 milestone. |
|
@MartinHjelmare do you know why I need to send I just came a cross the same issue with updated states with https://github.com/fredrike/home-assistant/blob/ab864c0d84427ce38f95b73bf97671e4c2b9ac90/homeassistant/components/climate/tfiac.py#L162 (after setting mode it takes until the next scheduled update for the new state to show up in HA). Is there something that I'm missing with the update? |
|
Non polling entities need to handle state update themselves, preferably in a callback initiated by the device, but if that's not possible, directly in the actuator method. For polling entities the state update is handled automatically at the end of the service call. |
|
Hit me up on discord for more discussion. |
Description:
#18780 removed
self.schedule_update_ha_state()after a entity is toggled, that made HA think that the device still had the old value. I.e., when toggling a switch the switch changes state and then goes back to the old state (until the next scheduled update), this fixes that #20169 (comment).Related issue (if applicable): fixes #
Checklist:
tox. Your PR cannot be merged unless tests pass