Home Assistant N00b here, although I do have some experience with zigbee lights of various types. I have some IKEA Tradfri, some Limitless LED, and some Phillips Hue bulbs which I am attempting to consolidate control of with a brand new Home Assistant install on an RPi 3, using a Sonoff zigbee dongle and ZHA. I’ve gotten rid of the different bridges and am controlling the lights directly. So far, it’s mostly all working. Mostly.
The thing I can’t get to work is the start-up settings for the Hue bulb in the guest bedroom bedside table lamp. Being a guest bedroom, it gets powered on and off with the lamp switch quite a bit, so when I was using the Hue bridge & app I set the default power-on settings to about 50% brightness and a nice warm white. Worked just fine.
Now that I’ve moved it over to Home Assistant, I’ve set the Configuration as Start-up behaviour: On, Start-up color temperature: 207 [on a 153 to 500 scale – really?], and Start-up current level: 127. I can read all these values back in the cluster attributes under Manage Zigbee Device so I believe they are getting stored in the bulb. However the bulb seems to be ignoring them.
Instead it flip-flops between two different power-on settings. The first time you power on, it goes to about half brightness cool white. If you power it off then on again you get full bright warm white. The next time back to half bright cool white, and so on. I have no idea why it’s doing this or how to make it respect the settings I’ve given it.
Digging further into this, and I’m not sure it’s related, but the bulb will not reconfigure. The logs report plenty of
'async_configure' stage failed: 'uint8_t' object is not subscriptable
which appear to be this known issue with the same dongle and the same bulbs as I have but it seems to have been closed without a resolution. I’m running core 2023.11.2 and supervisor 2023.11.3.
check that home assistant’s config of the light is not trying to ‘adjust’ it when it sees the light come back online.
check firmware versions of various bulbs and devices
A couple IMHO’s
I would not run any latest version of HA until last version released on last days of month, too many possibilities of bugs for a stable home automation system.
I moved from ZHA to Zigbee2MQTT after running both together for many years. The completeness, quality and breadth of people working on and testing zigbee devices in zigbee2mqtt is outstanding. OTA firmware upgrades is an example.
Well I sorta figured out some of what is going on. It seems I had misunderstood the warm/cool range backwards so I thought I was setting a warm colour temp when in fact I was setting a cool one. That means the 50% of the time the bulb powers on with the half bright + cool setting it was in fact doing what I told it. The other 50% of the time, when it powers on with the full bright + warm setting that is the default power on behaviour baked into the firmware. I still have no idea why it’s flip-flopping between the two. Setting the power on behaviour to ‘off’ or ‘toggle’ seems to work as expected, only when I set ‘on’ does it flip-flop like this.
The ‘object is not scriptable’ error message on reconfigure also occurs on a Tradfri bulb so it may be unrelated, or rather it may be something in the dongle that affects all bulbs to some extent.
In any case, I have disabled ZHA and switched over to Zigbee2MQTT. It seems to be much more stable and power on settings work properly every time so I’m going forwards with that. The issue I’m having now is it doesn’t want to work with my LImitlessLED bulbs at all, but that is for another topic.
Glad you found a solution! I think, from my experience, you will find Zigbee2MQTT a good solution. You might post your question on your LImitlessLED devices on the Zigbee2MQTT forums, or search there first. Pretty good user and dev support and willing to work on new devices. Good hunting!