State hue light not OK

I have some hue lights added with zigbee2mqtt. When the lights are unavailiable they are on. How do I get the real state ?

Turn off at the wall then turn back on to reset them and optionally pair it again to HA. I had this with the corner lamp not that long ago.

I also have it with some govee stuff. They are not connected at all (the govees and the hue’s), and the state is available… strange.

Yea its one of those things where you may want to have a spare smart plug if not a smart power point setup to let you setup an automation to say if state becomes unavailable then power off then power back on.

I may do the latter with smart power points when I get around to ordering them and just use the tuya based smart plugs I have for those since I have no other use for them at this time.

I have similar setup with my NBN modem and router so that if the WAN connection is detected as not connected for 5min then it turns off the NBN modem zigbee plug for 30s and turns it back on then waits 5min to check if the connection is back up else repeats until it is connected.

(I may get carried away with replies sometimes to give ideas from other automations etc I have setup or plan to lol).

Check availability in Zigbee2MQTT

I think he cuts power to the lights, and still sees them as on.

Hence why I suggested to re-pair them back to HA as it could be a service call error showing up.

I try this one… thanks

it checks and then the devices are going online again :frowning:

What exactly did you change ?

I added

availability:
  active:
    # Time after which an active device will be marked as offline in
    # minutes (default = 10 minutes)
    timeout: 10
  passive:
    # Time after which a passive device will be marked as offline in
    # minutes (default = 1500 minutes aka 25 hours)
    timeout: 1500

in my config.yaml in the zigbee directory

edit: all my devices are off in the zigbeemqtt. so it looks it does not work what I added…

Change timeout: 1 for active, and restart Zigbee2MQTT

that gives me what I want, thanks

Working now? if so then the default should be set to 1min instead of 10 if others have the same issue in the future (will make note this for those times).

It is not good practice to cut off smart bulbs with a switch. But if you want them to show ‘unavailabe’ after you cut the power, you need to set a timeout as short as as possible.
Smart bulbs are really made to be powered on all the time.

You just tell the last state to be on when using a power plug or smart power socket so that when power returns if you have any power issues its automatically in the on state to always provide power, I have this set to all devices that need to be always on.

The smart plug just lets me easier power cycle the device when I need to when it does not have an option and I don’t want to use the swtich at the wall myself.

and can I do something similar with govee2 mqtt ?

Test and check if it works for you with that, post results once you have it working.

it doesn’t have a config.yaml…