I get the following warning while I am running a script:
2025-01-20 16:15:01.255 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities light.familyroom_lights are missing or not currently available
Here is the script that produces the above warning when I configure a LIFX group as a light using the platform: group:
manually_update_lifx_lighting:
alias: Manually Update Lifx Lighting
description: Manually Update Lighting(Lifx) via Adaptive Lighting Sensor
# Start a new, independent run in parallel with previous runs.
mode: parallel
sequence:
- condition: template
value_template:
"{{ states(entity) not in ['unavailable', 'unknown', 'none'] and
states('sensor.circadian_brightness_pct') != 'unknown' }}"
# Check if the light input_boolean entity value is disabled i.e. off
- condition: template
value_template: "{{ is_state(entity_disable_cl, 'off') }}"
- service: lifx.set_state
data_template:
entity_id: "{{ entity }}"
brightness_pct: "{{ states('sensor.circadian_brightness_pct') }}"
color_temp_kelvin: "{{ states('sensor.circadian_color_temp_kelvin') }}"
transition: "{{ transition | default(45) | int(45) }}"
It fails when I set the state. I am not sure if this warning should happen or not? The same script works when I configure a group instead of the platform: group
The lifx.set_state action only works on LIFX-controlled light entities. There is no such thing as a LIFX group either, so Iâm not sure what you mean by that.
It will not work with a Light group created via Home Assistantâs âHelperâ tab in Devices & Entities.
Where and how did you create light.familyroom_group? Because groups shouldnât work as a target for the lifx.set_state action. If youâre using it with light.turn_on, it will work fine.
I have thought about creatingLIFX-specific groups for this purpose for a while now, but honestly couldnât really justify the effort given how little benefit it would provide.
What Iâm asking is how/where you defined group.familyroom_lights?
Never mind. Iâve reproduced the behaviour and it works with the deprecated/old style groups but not with the new style of groups. This is in fact more functionality that I expected so I would classify this as âworking beyond expectationsâ
@Djelibeybi Thanks for your dedication to this problem. So to answer my question: This is normal behavior? Since this is the intended behavior the message is little confusing:
2025-01-20 16:15:01.255 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities light.familyroom_lights are missing or not currently available
Itâs an interesting problem. The error only occurs because youâre building your automation and/or script by hand. If you tried to do this via the UI, it wouldnât even show light.familyroom_lights as an target option for lifx.set_state. So I donât know if this would be considered a bug or not, to be honest.