@noam76 wrote:
Hi, I use home assistant and try convert an input number to time format.
I can convert the number to minutes but I don’t succeed with the time.
I receive unknow to my timer_countdown_hour sensor.
Who can help me to correct my code?my input_number variable is timer_countdown
- platform: template sensors: timer_int: value_template: "{{ states('input_number.timer_countdown') | int }}" timer_countdown_min: value_template: "{{ states('input_number.timer_countdown') | int %60}}" # what is the correct way to do this operation ? timer_countdown_hour: value_template: "{{ states('sensor.timer_int') - states('sensor.timer_countdown_min') / 60 }}"
Posts: 7
Participants: 2