Lately, I think since HA 105, many of my Ikea lights dont use the last brightness setting when turned on (either by the motion sensor/switch or Ha interface) in the morning. They now turn on with brightness 0%… which is really annoying when you expect your bathroom to be safely lit ;-((
I am completely puzzled, since I havent changed anything in my Ha settings, and don’t believe the Ikea hub/software has changed settings on this functionality.
Could it be HA changed something when turning off lights? Could it be somehow now HA sets brightness to 0% when turning off, making the last recorded brightness 0% when turning on again?
for full disclosure, this is my script I use when set to sleep mode:
would it make a difference if I used this scene instead:
- name: Slapen
entities:
group.all_inside_lights: off
Sorry for the long topic title, but I would hope this to catch best what is happening. If anyone has a useful tip, Id appreciate it. Thanks!
edit
just thinking, could it be that the transition to ‘off’ makes the lights record the last brightness to be 0%? I used to have the transition in the scenes, but since that functionality unfortunately was taken from us, had to rewrite all my scene into scripts with transition.
If I don’t want to cut the lights off immediately, but also want them to simply turn on in the morning…this would warrant the re-introduction of transition for scenes alone!
To set the default color and brightness values when the light is turned on, create a custom light_profiles.csv (as described below in the profile attribute of light.turn_on ).
The .default suffix should be added to the entity identifier of each light to define a default value, e.g., for light.ceiling_2 the id field is light.ceiling_2.default . To define a default for all lights, the identifier group.all_lights.default can be used. Individual settings always supercede the all_lights default setting.
I think you should do this.
You can still override the defaults for times when you don’t want to turn them on to full brightness with the service call, but if you want the lights to turn on to a known state when you simply say “light.turn_on”, try this.
yeah I can try that, but this wont work when the Ikea motion sensor to which the light is coupled turns the light…It is a direct Ikea communication, and has nothing to do with the ha settings
remembering this 0.101: Airly, Apprise, Sinch, Solar-Log, Microsoft Teams when Balloob mentioned the transition would maybe come back. Please @balloob, forgive the tag, but could my issue here be caused by this? Im perfectly willing to issue this as a bug if must be, but rather be sure before I do so.
Hue lights are triggered from the Hub with a specific brightness setting so dont suffer from this. Ikea lights are not, and simply turn-on with the last brightness setting. Which is 0% if turned down with a transition in the script.
before the transition in the scene didn’t cause this to happen.
Thanks for having a look.
How many of those motion/light combos do you have? You could move them to a different group and just have them turn off. Or remove the bathroom light from the main group…I assume you have that one turning off automatically anyway?
I’d have to think of a good way. You could set an automation that triggers when the bathroom light turns on and set the brightness to 100%…but that would remove your ability to turn it on to any other brightness.
But these all sound like janky workarounds to me and not ideal.
many… all my rooms with Ikea lights have a motion sensor (some even 2) and a remote switch. They all use the last brightness.
sure, but simply turning them off is not what I want, I want the transition, (and not kill the turn-on brightness)
yeah, agree
it did work flawlessly though…remarkable thing is, many of these lights are not even ‘on’ when this script is used. Apparently, while being ‘off’, this transition sets their brightness to 0% too? Maybe it isn’t the change in Scene integration after all, and has something else changed that could cause this.
@ggravlingen would you know of a way to get this working again? We’ve talked before about remote resetting the Hub , but this is an issue of a different kind.
remarkable thing is, many of these lights are not even ‘on’ when this script is used. Apparently, while being ‘off’, this transition sets their brightness to 0% too
You can fix that part at least by only selecting lights that are on…but that wont fix your real problem.
slapen_lighting:
alias: Slapen lighting
sequence:
# Only bother if there is at least one light on.
- condition: template
value_template: "{{ expand(states.group.all_main_inside_lights) | selectattr('state','eq', 'on') | list | count > 0}}"
- service: light.turn_off
data_template:
entity_id: >
{% set ns = namespace(group=[]) %}
{% if is_state('group.h', 'not_home') %}
{% set ns.group = expand(states.group.all_inside_lights) %}
{% else %}
{% set ns.group = expand(states.group.all_main_inside_lights) + expand(states.group.plafond_spots_woonkamer) %}
{% endif %}
{% set all_lights =
{{ ns.group | selectattr('state', 'eq', 'off') | map(attribute='entity_id') | list | join(',') }}
transition: 6
limiting maybe (they dont allow for default brightness/color settings like the Hue, but speed is fine here, and I have many lights so really use the hub to its full extent
It is a CSV with the following (id,x,y,brightness)
group.all_inside_lights.default,0.5119,0.4147,219
Where x and y are
xy_color yes A list containing two floats representing the xy color you want the light to be. Two comma-separated floats that represent the color in XY. You can find a great chart here: Hue Color Chart.