Show bulb as "off" when the linked Thing is offline
Closed this issue · 6 comments
Hi,
I am using this binding in openhab 2.5.0 and I wanted to show the Zigbee bulbs as off when they are switched off from the wall switch (some time after the power cut to the bulb the Thing will appear as offline)
rule "ZB_Sofa"
when
Thing "zigbee:device:4b531422:7cb03eaa0a05ce9b:7CB03EAA0A05CE9B_3_dimmer" changed to OFFLINE
then
ZB_Sofa.postUpdate(OFF)
end
Do you think that this should be implemented in the binding? Other bindings (for instance Samsung TV), show the item as "OFF" when the TV is offline.
Thanks for your great work!
show the item as "OFF" when the TV is offline.
How do I know it is off? It is OFFLINE, so that means we cannot communicate with the device.
show the item as "OFF" when the TV is offline.
How do I know it is off? It is OFFLINE, so that means we cannot communicate with the device.
Yes it is an assumption, but at least is a way to know it. For bulbs I think is more interesting to know it, so I will keep using the Rule I posted before.
I would argue that if this is considered the correct implementation, then this should be handled by the core so that it is consistent for all bindings/things. The core knows when a device is OFFLINE, so it could set the state to OFF, or probably more appropriate would be UNDEF to show that we just don't know.
Maybe it's worth opening such a request in the openhab-core repository.
Yes I totally agree with you, in fact I have modified my rule this way:
rule "ZB_Sofa"
when
Thing "zigbee:device:4b531422:7cb03eaa0a05ce9b:7CB03EAA0A05CE9B_3_dimmer" changed to OFFLINE
then
ZB_Sofa.postUpdate(UNDEF)
end
Regarding the open of the request, I will do it, but why in the openhab-core repository intead of in this one (noob question)?