I have an input_number
working in Lovelace that is used in an automation to transition my lights in the morning (like a “sunrise” lamp). It’s working right now, but only in seconds, and I want the user to be able to input minutes.
My automation is below. The transition
line isn’t working. I tried int * 60
but it didn’t work (resulted in null). How can I do math on this number?
- id: '1602599192500'
alias: Sunrise lamp
description: Sunrise lamp
trigger:
- platform: time
at: input_datetime.sunrise_master_bedroom_lamp_time
condition:
- condition: state
state: 'on'
entity_id: input_boolean.sunrise_master_bedroom_lamp_enabled
- condition: or
conditions:
- condition: state
entity_id: input_boolean.sunrise_master_bedroom_lamp_weekend
state: 'on'
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: light.turn_on
data:
transition: '{{ states('input_number.sunrise_transition_time') | int * 60 }}'
brightness_pct: 90
entity_id: light.color_temperature_light_attic_logans_lamp
mode: single