Before 117 if a light or plug/outlet was on when HA was restarted once it had started again the states the devices were in at time of restart where restored so it would still show them as on or off.
But now all ZHA devices show as off after restart. other devices are unaffected Z wave switches restore correctly so do wifi switches only seems to affect ZHA.
Edit: seems to only actually be happening to light entities so maybe its meant to be like this? All my lights are zigbee so dont know if its ZHA or HA issue.
got 2 smartthings outlets one is set as switch in config for ZHA one is set to light the light one defaults to off on restart but the switch one shows the state it was before restart as expected.
these plugs dont seem to get polled so the state never seems to get updated in HA if it gets out of sync.
configuration.yaml
this is the only error i can find to do with zigbee but have no idea if its related to this issue or not.
```Logger: zigpy.util
Source: /usr/local/lib/python3.8/site-packages/zigpy/util.py:49
First occurred: 6:48:31 (1 occurrences)
Last logged: 6:48:31
Error calling listener.attribute_updated: UNIQUE constraint failed: attributes.ieee, attributes.endpoint_id, attributes.cluster, attributes.attrid
```
Hey there @dmulcahey, @adminiuga, mind taking a look at this issue as its been labeled with an integration (zha) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
@abmantis could it be caused by https://github.com/home-assistant/core/pull/41554 regarding zha light state after a restart?
@blair287 switches are not polled, but should report back every 15 min.
@Adminiuga i don't think so, since #41554 only impacts devices with the skip_configuration flag, and lights don't have that. But I may look at it better later.
@abmantis could it be caused by #41554 regarding zha light state after a restart?
@blair287 switches are not polled, but should report back every 15 min.
yes it eventually updated correctly.
regarding the lights defaulting to off on restart its working fine on 114.4 definitely and not sure about 116.4 as didnt notice on that.
if i change the outlets to be switches in config file they keep their state after restart set them to light and after reboot they are off. so definitely only seems to be impacting the light. domain.
I can confirm the issue on 0.117.x. Sensor entities, eg power measurement are also showing "undefined" until 1st attribute arrives.
But I'm seeing the same on 0.116.4 馃く
and still can reproduce on 0.115.6
So I can reproduce the issue starting at least with 0.115.0.
0.114.0 works as expected. Surprised nobody noticed/complained so far
Bisect leads to this PR https://github.com/home-assistant/core/pull/39756
Not sure if this is related, but for me after updating from 0.116.4 to 0.117 all lights (HUE) went crazy after a while. Toggleling a light required multiple clicks or did not work at all. Also on 0.117. After Rollback to 0.116.4 all lights came back to normal life. (rPI3b+ConbeeII).
Bisect leads to this PR #39756
At least I wasn't dreaming it 馃槀馃槀
Bisect leads to this PR #39756
Im on 117.4 and this issue still appears to be present. Was it fixed or is it waiting on being merged? not being impatient just wondering if its still an issue or its just not been fixed yet.
Thanks
I think it will be in home Home Assistant 0.118. You can try the beta if you want.
0.118 is released so no need for beta / dev if the fix was merged :-))