Hi,
I’m using a blueprint so automate the double press of the ON button on my inovelli switch. Now i wanted to add that when the sun is below horizon the color temp of the light bulb is set.
here is what i got:
- id: '1635288344964'
alias: Light Louis On/Off
description: ''
use_blueprint:
path: jerelabs/zwave-js-inovelli-lzw31-sn-red-series-dimmer.yaml
input:
inovelli_switch: d4dcdd870e75a7b85d619c0908b8ddfb
button_a2:
- service: light.turn_on
target:
entity_id: light.ampoule_a_louis
data:
color_temp: >-
{% if is_state('sun.sun','below_horizon') %}
color_temp: 461
{% else %}
color_temp: '{{ range(40, 600) | random }}'
button_b2:
- service: light.turn_off
target:
entity_id: light.ampoule_a_louis
data: {}
But the color_temp is not set. I have search in the forum and documentation and didn’t find anything to help me out. What is the correct format to add an IF statement ?
Thanks