Hey #HomeAssistant friends.
Is there any way to find out *why* a light turned itself on at 3 o'clock this morning?

I can see it happening in the Activity Log - but it doesn't say what caused it.

(Generic #ZigBee lights attached to a Hue Hub, if that makes a difference.)

@Edent try to change the turn on behavior after an power cut to "restore". This seems like a power outage and after it gets power, it's on again, as that's the default.
@kaiserkiwi Thanks. Looks like I can only do that with the bulb's official app which only works on an older version of Android and is incompatible with my hub.
Ah well, sleep masks it is!
@Edent @kaiserkiwi
You can check on Z2M whether the device is known, and exposes the „power-on behavior“:
https://www.zigbee2mqtt.io/supported-devices/
Doesn‘t help you now when the Hue bridge isn‘t providing that setting, but may prove helpful when migrating to a fully controllable network.
@AliveDevil @kaiserkiwi
Ooooh! That is helpful. The specific bulb isn't actually on there, but gives me something to work with.
I don't suppose I can somehow send those Zigbee commands through HomeAssistant, can I?
@Edent @kaiserkiwi
Difficult, yeah.
As Z2M is just another way to interact with a Zigbee network (and has to be in charge of it), just like Zigbee Home Assistant (ZHA), or the Hue Hub.
Unfortunately, I never had access to a Hue Hub to check what one can do with it.
The only downside: you need to have some ethernet or USB enabled Zigbee dongle.
@AliveDevil That was very helpful, ta!
I can get some Zigbee stuff out of the Hue, but can't send the poweron state settings.
Any recommendations for a Zigbee dongle that'll work with Linux?
@Edent
So, I‘ve had a Dresden Elektronik Zigbee dongle for a long time, but that had stability issues (OTAs wouldn‘t work, sometimes).
I‘ve migrated to a Sonoff Dongle Plus MG24, with minimal issues. For link quality I can‘t complain, brick house from 1950ish in northern Germany.
Be aware of USB3.0 and near-field 2.4 GHz interference (these wireless dongles next to a USB3 thumb drive? Bad idea), which will impact signal quality.
@Edent
These dongles all use some kind of USB-TTY serial console interface, which won‘t make any problems on Linux, generally speaking.
The design, placement, and wifi channel overlap will have a greater impact on performance/stability, than the USB serial console interface.
@Edent
Here is a list of supported adapter hardware stacks (zStack, EmberZNet, deConz): https://www.zigbee2mqtt.io/guide/adapters/
Each sublist will feature a list of newest hardware, and generally supported dongles.
As I only had two dongles so far, I don‘t have that much to recommend.
IIRC, @kaiserkiwi (sorry to pull you in again), switched from USB to Ethernet because of inconsistent network behavior.
Supported Adapters | Zigbee2MQTT

Zigbee to MQTT bridge, get rid of your proprietary Zigbee bridges

@Edent
I.e. the MG24 is an EmberZNet chip.
Replacing dongles within one hardware stack is usually possible.
When switching the hardware stack, it can work, but you may have to recreate the entire network, when it doesn‘t work out.
@Edent @AliveDevil if the lights are connected to the Hue bridge, is the power-on behaviour settings not available in the Hue app any more? IIRC it used to be.
@wmr72 not that I can see - but happy to take pointers.