IKEA Sensor and light dim at night

Hi im new to this HA :slightly_smiling_face:

But is it possible to make automation to dim the light in the bathroom from 22:00 to 06:00 with IKEA Trådfri sensor and light bulp?

Have you already integrated the sensor and the bulb into home assistant? If yes, take a look at automations.

1 Like

I have. And i cant find one that set light to 20% after 22:00 and then to 100% after 06:00 ?

Yep. Assuming you have a tradfri hub (or an alternate control method. I wouldn’t suggest looking at those yet)

You create a time based automation which goes off at 22:00 to dim the light.

Then another at 06:00 which returns it to normal brightness (if it’s on. That’s a condition)

2 Likes

i have the ikea hub.

But will the trigger work when the light turns on? i have a ikea sensor that turns on the light.

Want the bathroom til dim to 1% at night.

And the sensor is not integrated into Home Assistant?

the light bulp, sensor and hub are in the HA.
Im newbie to this, so sorry if i ask noob question. :slight_smile:

Just to make sure I’m on the same page as you:

You have an ikea bulb in the bathroom
You have a motion sensor which turns on the light. This is done through the tradfri hub, with no connection to HA.

You want the light which is automatically turned on at night, to come on at 1%
You want the light to come on at 100% outside of that time.

Assuming this is the case:

If you set the brightness to 1%, then turn it off, then let the sensor turn it on, and it comes on at 1%, this is entirely doable. Just a little more complex than might be desired, because you can’t adjust the brightness with the light being off. so you need:

An automation to:
turn the light on at 22:00 at 1%
have a 1 second delay action
turn the light back off.

Then another automation to:
turn the light on at 06:00 at 100%
have a 1 second delay action
turn the light back off.

If the sensor can be used as a trigger in home assistant, and that’s what is turning it on and off, then you want to have two different automations for that. One which does 100%, one which does 1%. With a time based condition to determine which is working.

2 Likes

Now we are on the same page :slight_smile:

That souloution you suggested is perfekt for me if it works :slight_smile:

i will try that :slight_smile:
thanks

Do you know the easiest way to do that? Dont really understand the triggers? :confused:

How are you configuring HA? via the gui, or with yaml?

Im am configuring via HA GUI, but dont really know how to use it, and “Automation Editor” isnt so easy to understand i think.

No problem :slight_smile:

So you want to create a new automation. Give it a name. Pick a trigger type of Time.

Go down to the actions section, and fill in the various actions.

Now, there is a downside to the way this is done. If the light is on, it’ll be set to 1% and then turned off. Which is less than ideal. You may wish to complicate matters with a pair of automations, where one doesn’t turn the light off, but only if the condition of the light being on is true. And the other if it’s off.

1 Like

Thank you :slight_smile: will right away try to do that :smiley:

You’ll probably want to adjust that 25. It’s around 10%. (it’s 1 to 255.)

i get “Message malformed: expected dict for dictionary value @ data[‘action’][0][‘data’]”


when i try to save

try putting a space between the : and the 25

workd :wink: now i will test.
thanks for the help :slight_smile: