exactly, so true.
I’ve tried to convey that to the Ikea dev team . Would be best, and should be rather easily done, since Tradfri pushes its states to HA (unlike Hue, which has to be polled)
Anyways, I think you are right with your above techniques establishing unavailable, though it seems rather complicated, and, needs a smart powerswitch.
Theres no need to change the brightness. Try my automation and you’ll see it works just fine, and nobody notices anything
sorry, but i don’t understand that would work given the condition you have:
- condition: state
entity_id: light.kitchen_1
state: 'on'
state won’t be on if the light is unavailable, hence the action won’t trigger? Ive tried many situations, and ended using !=‘unavailable’… working in any situation
I see. I had to make the distinction between being power cut and being ‘off’ with power.
I both cases my automation does its job.
cool to see each has their own needs. and solutions
I got the IKEA Tradfi Gatawey and I haven’t Zeegbee/Decons/ZHA or other USB dongle…
If I power off the Ikea Bulbs from the wall switch their status remains “on” and don’t go to “unavailable”. Only some bulbs do this, the others stay always “on” for hours/days. So, your automation give me a fake value of brightness, because in reality the bulb is switched off from the wall.
This happens also in the Ikea App (smartphone). No status updated
My Ikea Bulbs firmware for someone is 2.3.093, for others 2.3.095 (but this issue seems non related to bulbs firmare). Instead, my gateway firmware is 1.21.31.
out of curiosity: why would this still be a useful automation?
in the past, I only did this to keep the gateway alive, and controlling a single light did help. setting a light to its current state.
now I see this being executed to all lights, I am wondering why you would hammer the gateway so often, and it this isnt more hurtful than the original issue.
btw, the Ikea integration suffers terrible performance regularly, requiring restarts more than a few times per day, and even HA restarts now, to complete the integration restart…
GitHub issues for that exist since over a year and no action is taken unfortunately
It is because when a light is physically switched off, the tradfri gateway is not reporting the light as unavailable. It never did unless you change something on the light.
So this script, by slightly changing from time to time the brightness on all lights trigger the unavailable state to be reported correctly in HA. Otherwise, the light remain on/off while it is actually unavailable.
If 5 minutes is hammering the gateway, you can increase the time and/or change the group to only contains the lights that really matters (e.g.: state transition from/to unavailable used in another automation). Note: only include lights that are powered by the main line, otherwise it will drain the battery.
As I said, sending the exact same values did not work for me, the gateway being smart enough to not flood the zigbee network for nothing hence the slight change of brightness.
I see, you are still tackling that peculiar behavior.
I on the other hand am getting more and more frustrated with the integration losing touch with the gateway and requiring reload or worse , restart of Ha…
Don’t you experience that, seems way more impactful and blocking core operation because of unavailability to the system
I do of course.
I bought a sonoff micro for that particular reason that is cutting the usb cord of the tradfri gateway.
I’ve an automation to off/on the sonoff when there is a suspicion of disconnection (I compare some light sensors with the status of some key light bulbs)
If I have reasonable suspicion, I switch the sonoff, wait 1 minute then restart the IKEA integration (I used to restart HA but it seems to be from the past, at least for me)
For all those reasons, I’m moving to a Zigbee CC2531 that is plugged to my RPi. It is not very powerfull but with the meshing, it is working fine (up to 30 devices I think but still not there, for now)
Technically, Zigbee (and ZHA) are not limited in number of devices.
But the small CC2531 that was originally meant to do zigbee sniffing and that I flashed for zigbee2mqtt is not strong enough to handle more than 30 devices or very poorly probably.
I tried @Olivier1974 his script and automation, I see in the log that it is changing the intensity of the lights, but the lights don’t become unavailable even though they’re powered off. Also, if I change something manually about the lamp, it just jumps back to the previous value without becoming unavailable.
Are the other people in this thread who were using this kind of scripts/automations having the same issue?
I’m using a Dirigera with Home Assistant 2025.1 Tried with both the IKEA Dirigera integration and through Dirigera to Matter. In the Ikea Home Smart app the lamps become unavailable a few seconds after turning off the power.
In those days it was a Tradfri not a Dirigera gateway.
Don’t know if the script is working in the same way with the Dirigera GW.
But since, I’ve also switched to a more powerfull Zigbee USB key and in Zigbee2MQTT, I asked for a reporting of color, intensity and OnOff status, that solved the issue I had with Ikea.
Moreover I was able to pair all my zigbee devices on only one non proprietary hub.