I use the following automation to turn light on/off automatically with a motion sensor & was looking to add “colour” notifications for weather alerts - but I get the following error logged:
Got unknown color “white”, falling back to white
Here is the automation:
- alias: "hallway motion on"
initial_state: "on"
trigger:
- platform: state
entity_id: binary_sensor.fibaro_system_fgms001zw5_motion_sensor_sensor
to: 'on'
condition:
- condition: state
entity_id: light.hallway
state: 'off'
- condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
- service: light.turn_on
data_template:
entity_id: light.hallway
brightness_pct: >
{%- if now().strftime('%H')| int >= 22 %}
50
{%- elif now().strftime('%H')| int < 7 %}
30
{%- elif now().strftime('%H')| int >= 7 %}
100
{%- endif %}
transition: 3
color_name: >
{% if is_state('sensor.dark_sky_precip', 'rain') %}
"blue"
{% else %}
"white"
{% endif %}
- service: input_boolean.turn_on
entity_id: input_boolean.motion_auto_on
Any ideas?