I’ve tried every which way to get this to work
action:
service: light.lifx_set_state
entity_id:
- light.couch
- light.entry
data_template:
rgb_color: >
{%- if (states.light.kitchen_2.attributes.rgb_color) != (167, 167, 167) -%}
[167,167,167]
{%- else -%}
{%- endif -%}
And I keep getting the following error:
2018-01-12 13:19:23 ERROR (MainThread) [homeassistant.core] Invalid service data for light.lifx_set_state: None for dictionary value @ data[‘rgb_color’]. Got ‘[167,167,167]’
What’s weird is that this seems to work just fine:
action:
service: light.lifx_set_state
entity_id:
- light.couch
- light.entry
brightness_pct: 10
rgb_color: [218,190,160]
As does this:
action:
service: light.lifx_set_state
entity_id:
- light.Kitchen_1
- light.Kitchen_2
- light.Kitchen_3
- light.couch
- light.entry
data_template:
brightness: >
{%- if (states.light.kitchen_2.attributes.brightness) < 255 -%}
255
{%- else -%}
60
{%- endif -%}
Any thoughts?