#Entity Conditions - Ikea Smart Bulb Brightness

1 messages · Page 1 of 1 (latest)

autumn pawn
#

I want to set a condition that if X entity ID triggers and the brightness level on the bulb is not fully high then it will increase it to max. When I select the attribute for brightness it is just free form no options really to select.. How do you know what values it will accept to know what the max is?

severe flame
#

Brightness is always 0 to 255 for all lights.

#

sometimes you will also see a brightness_pct which is a percentage from 0 to 100.

autumn pawn
severe flame
#

screenshot?

#

I guess you're currently using a device action, if it is broken, you can switch to using a light.turn_on action instead.

autumn pawn
#

@severe flame

#

It Lets me set the value of the bulb when it turn is on to 100 percent but doesn't let me decrease it back down to say half.

severe flame
#

Yeah so that action is provided by the specific integration that provides your light. I don't know exactly what it does

#

You can get finer control with light.turn_on

autumn pawn
#

So just use the same light turn on that I used to turn it on to 100 percent.

severe flame
#

I can't see exactly what you used, but there should be an action called light.turn_on

autumn pawn
#

Oh man that now opens up a ton more options if I select the entity of front porch light.

autumn pawn
#

@severe flame I might need some more logic help. Having trouble thinking through doing this after Sunsets I want the light to come on @ 50% and always be on until its 11pm. After that turn it off. I have that automation set. That logic is all good. However when I am increasing the brightness during garage opening coming home events or when real motion is detected. How would you get it to go back to the state its supposed to be in from sunset to 11pm. Then if its after 11pm it needs to go back off.

autumn pawn
#

So what I am trying it setting a delay condition after it increase the brightness. Then setting the default conditions that if after sunset and before 11pm. Turn light on @ 50%. If its after 11pm turn light off as part of another default action option.

#

So I am thinking this might work. So that the if one of the other triggers run for motion or coming home it will activate the light to 100% and wait for delay time to pass. Then go back to default actions of either off or on and brightness at 50%.

nocturne comet
#

I've been experimenting with target state helpers. You can define a template that returns the desired value for the current time and set up an automation that says if state of light deviates from desired state for [timeframe], set light to desired state

nocturne comet
#

something like this?

{% set lightOffTime = today_at("23:00") %}
{% if ((now().hour < 12) and (now() < sunriseTime)) or (now() > lightOffTime)%}
0
{% else %}
127
{% endif %}```
autumn pawn
#

I noticed in the activity log it doesn't notice what percentage level I set the light to its not something that is tracked. Is there a reason for this?

#

Even when I manually move the light to a percentage its not a value that is tracked.

#

Before I saw your response I tried to set a trigger that if the brightness level was at 100% for 10 min it would back it down to 50%. But it couldn't detect the % level that the light was at.

nocturne comet
#

As karwosts said, lights are generally a 0 to 255 so I don't use percentages in automations. I guess IKEA just chooses not to report a percentage

elder raptor
#

It's just HA that maps brightness to 0-100% for the UI. In the background it's 0-255.

And you can just use a state trigger to see it's at 255. Issue is, if you do it via de UI it will try to match '255' (string) instead of 255 (integer). So you have to change it in yaml. Or, just use a numeric state trigger with above: 254.

trigger: numeric_state
entity_id:
  - light.study_bulb
above: 254
attribute: brightness
for:
  hours: 0
  minutes: 10
  seconds: 0
autumn pawn
#

I ended up using the "light on" option it can set the brightness and color levels at the same time.

turbid mesa