Detect on/off status - manual light

I have zigbee bulbs in lamps that are sometimes turned on manually. Currently that status is not reflected in HA. Is there a way to fix this challenge?

Why? Just fix this.

That is what I’m asking. How do I fix the status in HA when the light is manually turned on.

What do you see in Developer Tools / States?

No, if you power-off a Zigbee device with a dumb switch then it will be “offline” (as in unreachable, not available, which is unexpected and not a desired state in a Zigbee network), and more importantly, note that if they are Zigbee Router (ZR) devices and not Zigbee End Devices (ZED) then it is a really bad idea to power them off. Zigbee Router (ZR) devices always need to have power as they are part of the Zigbee network mesh infrastructure. See related discussion here → Stop Zigbee Mains powered device from being a router? (ZHA)

Understood. 99% that is the case the light is always powered on. It’s a lamp, so sometimes my wife manually turns the knob to power it on vs using HA to turn it on. This 1% use case is what I’m trying to solve for in HA.

I put a piece of tape over the switch.

yea… from my experience that went over well… :anchor: :balloon: :grinning:

I also recommend removing the switch/knob, but in a more estetic way :wink:

Tip is to consider buying smart switches which can be decoupled from cutting the power physically.

Regardless, having dumb switches to smart devices does not meet WAF.

Block access to the physical power switch (or give her a stern warning!) and provide a smart alternative such as a Zigbee button that you put near it. eg: IKEA, or Xiaomi.

I use the Xiaomi ones where I only want to control a couple of lights (you can do single, multipress or long press) and the IKEA ones where I want even more options.

All good suggestions. Is there not a way through message delivery or something to force the update of HA when it’s manually turned on.

Turned on shouldn’t be the issue. It’s that when there is no power it will show up in HA as ‘unavailable’. Once it powers back on and connects to the network it should update fine in HA.

It’s not. I’m not sure but maybe I have something off when I originally configured my zigbee integration?

Any advice here? Example today it’s raining so it’s dark in the house. Turned the lamp manually on hours ago, but the status isn’t reflected in HA. I feel like I’m missing something in my integration with Zigbee2MQTT

Is the Topic to Subscribe to in HA supposed to match Home Assistant status topic in Zigbee2MQQ?

Actually when it’s manually turned on, the status in Zigbee2MQTT isn’t reflected properly so it’s not HA, it’s something I have configured incorrectly between Zigbee2MQTT and Mosquitto, but I just don’t know what is incorrect.

I’m seeing a state off on Zigbee2MQTT, but not a state on when the lamp is manually turned on/off. Is there something configuration wise to get the on status to be seen?

MQTT publish: topic 'zigbee2mqtt/Family Room Lamp 1B', payload '{"brightness":254,"energy":26.04,"linkquality":188,"power":8.3,"state":"OFF","update":{"installed_version":9,"latest_version":9,"state":"idle"},"update_available":null}'

The answer is no.
If you turn on a zigbee device, be it a light or a switch - manually, it does not show as ON in Zigbee2MQTT or whatever you use. It will only properly reflect the state if you tell it to come on.

understood. you have to have power to get the mqtt message. Is there a way to pull the status on some interval?

it MAY be possible to issue an MQTT command to get make Zigbee2MQTT refresh the state, but I don’t know if it actually requests the state, or just returns a cached result.

Give it a go, pretty much all the devices work the same way -

zigbee2mqtt/FRIENDLY_NAME/get