I have some IKEA Tradfri lamps that turn on in the event of a power cut, even if they were turned off before the event.
How can I prevent this from happening?
TIA
This is the standard fallback from the bulb itself Also seen at others like Philips Hue.
When you can detect the power cut in HA, you could make an automation that turns them of automatically.
I read somewhere that this is legal requirement; in case of emergency intervention during night, swithing power off/on gives rescue team chance to control lights in case of unknown home automation system overtaking normal switches.
unfortunately it happens even if I have a power glitch, i.e. something I can’t “see” in ups status… in any case I’ll try to check the logs
You don’t mention which integration you’re using (ZHA or Z2Mqtt).
Z2MQTT definitely has a setting for power_on_behavior for IKEA tradfri bulbs. Not sure whether ZHA has this setting or if you can adjust it by writing to a specific cluster.
If all else fails, my workaround for bulbs which don’t support this is an automation using this logic:
Trigger: state
From: unavailable, unknown
To: on
For: 5 minutes
Action: call service light_turn_off
Apologies for the crappy formatting but I’m on mobile. Should be enough to point you in the right direction though. Let me know if you get stuck & I’ll post the properly formatted actual automation
U used to use ZHA and this setting was there. Now I use Z2MQTT and this setting is there as well. So you can definitely control this behavior after power cut and restore.
using DECONZ here, thank you
well, a simple “deconz power on behaviour” search with google led me to this
using deconz is possible to edit the attribute
tried right now, working as expected (in my case I set it on “previous”)
HTH