Can you please add the availability to modify the duration (2 possibilities):
Solution 1
use Jinja in the YAML configuration file. Like
duration: "{{ states('sensor.iu_duree_erables_entree') }}"
sensor.iu_duree_erables_entree could always be in HH:MM:SS format using a template to convert it from minutes.
template:
- sensor:
- name: "IU Durée Érables entrée"
unique_id: iu_duree_erables_entree
state: >
{% set m = states('input_number.duree_erables_entree')|int %}
{{ '%02d:%02d:00' | format(m // 60, m % 60) }}
Solution2
Have a service (like the adjust_time) to set the duration from an automation
Can you please add the availability to modify the duration (2 possibilities):
Solution 1
use Jinja in the YAML configuration file. Like
duration: "{{ states('sensor.iu_duree_erables_entree') }}"sensor.iu_duree_erables_entree could always be in HH:MM:SS format using a template to convert it from minutes.
Solution2
Have a service (like the adjust_time) to set the duration from an automation