The brightness and duration no longer does what it would normally do. The colour is Red like it should be but it stays as bright as it last was before it was changed by setstate
I am also having a very similar issue since updating.
Lifx “set state” no longer controls lifx bulbs reliably. It won’t set a kelvin value and sometimes the colour will not change on previously stable automations.
But if I do it on a label of every light in those groups, then it works fine.
So is this a problem where it’s getting the light group and Home Assistant isn’t applying “Set State” changes to the individual lights or is it something that needs to be fixed in the LIFX integration?
This template code is a mess, and I couldn’t figure out a way to create a Home Assistant helper template out of it, but this grabs all light entities currently turned on within those groups so long as those groups don’t include other groups:
{% set light_groups = ['light.basement_lights',
'light.bedroom_hallway_lights', 'light.dining_room_lights',
'light.entryway_lights', 'light.guest_bathroom_lights',
'light.guest_bedroom_lights', 'light.guest_bedroom_vanity_lights',
'light.kids_bedroom_lights', 'light.kids_bedroom_vanity_lights',
'light.kitchen_lights', 'light.living_room_lights',
'light.master_bathroom_lights', 'light.master_bedroom_lights',
'light.master_closet_lights', 'light.office_lights'] %} {% set
lights_in_group = light_groups | map('state_attr', 'entity_id') | list %}
{% set lights_on_in_group = lights_in_group | sum(start=[]) |
select('is_state', 'on') | list %} {{ lights_on_in_group }}
With LIFX’s Set State, I don’t need the lights to be turned on to change their state, but minimizing the number of lights to target helps speed things up and limit network traffic.
What I’m wondering is if there’s an advantage to using LIFX’s Set State vs just light.turn_on?
The only advantage is the ability to change the HSBK values without the light being on. Then, any plain light.turn_on service call will turn the bulb on with the updated values.
I use the Adaptive Lighting custom integration to generate values that I pass to lifx.set_state across the house in a single automation so that all the other automations can just call light.turn_on without having to customise each one, e.g. motion-controlled or other automatic light control.