I want to change a RGB lam color depending on weather condition next day. I have made templates for each weather condition i want the lamp to change on. I use the sensor in automation.
Its working but i have one problem.
The sensor “delvis_molnigt” and “molnigt” is both turned on when the weather is “cloudy” and “partlycloudy”…
My tought is that its turned on because the letters “cloudy” is in both sensors!!
How do i fix that?
Here is the sensors:
soligt:
friendly_name: “soligt imorgon”
value_template: “{{ ‘sunny’ in state_attr(‘weather.smhi_home’,‘forecast’)[1].condition }}”
snow:
friendly_name: “snow imorgon”
value_template: “{{ ‘snowy’ in state_attr(‘weather.smhi_home’,‘forecast’)[1].condition }}”
regn:
friendly_name: “regn imorgon”
value_template: “{{ ‘rainy’ in state_attr(‘weather.smhi_home’,‘forecast’)[1].condition }}”
delvis_molnigt:
friendly_name: “delvis imorgon”
value_template: “{{ ‘partlycloudy’ in state_attr(‘weather.smhi_home’,‘forecast’)[1].condition }}”
cloudy:
friendly_name: “molnigt imorgon”
value_template: “{{ ‘cloudy’ in state_attr(‘weather.smhi_home’,‘forecast’)[1].condition }}”
Error loading /config/configuration.yaml: while parsing a block mapping
in “/config/binary_sensor.yaml”, line 30, column 9
expected , but found ‘’
in “/config/binary_sensor.yaml”, line 31, column 113