I cant work out why I keep getting the
Failed to call service light/turn_on expected float for dictionary value @ data[‘brightness_pct’]
when using this button card config
show_name: false
show_icon: true
type: button
show_state: true
tap_action:
action: call-service
service: light.turn_on
data:
brightness_pct: |
{% if (now().hour >= 23) or (now().hour <= 7) %}
0.1
{% else %}
1
{% endif %}
color_temp: |
{% if states('sun.sun') == 'below_horizon' %}
rgb_color:
- 255
- 50
- 0
{% else %}
370
{% endif %}
target:
entity_id: light.wiz_rgbw_tunable_de5c9e
hold_action:
action: call-service
service: light.turn_off
target:
entity_id: light.wiz_rgbw_tunable_de5c9e
data: {}
Can someone give me some insight on this?