Number as Time

Hallo ich bin recht neu im Thema Homeassistant und mein English ist furchtbar, hier mein Anliegen.

Ich habe einen Backofen mit local Tuya eingebunden und stehe vor folgendem Problem.

Die zeit Eingabe erfolgt mittels number entity
entity: number.zeit_2
hier kann ich die zeit einstellen in minuten also zb. von 1 bis 160 Min doch ich hätte gerne das ich hier minuten und stunden einstellen kann und homeassistant dies als minuten zur entity: number.zeit_2 sendet.

Im Moment sieht es so hier aus
https://1drv.ms/i/s!At8rK2C8XsGepmKou8ZPwbRos_R1?e=CbD3Sa

hätte es aber gerne so hier

https://1drv.ms/i/s!At8rK2C8XsGepmMPbdFzpBd0LT0i?e=iPU11h

noch etwas wenn der Ofen gestartet ist läuft die entity: number.zeit_2 rückwärts

ich hoffe man versteht was ich meine und kann mir helfen. Danke

Hello, I’m quite new to the topic of home assistants and my English is terrible, here’s my concern.

I have integrated an oven with local Tuya and am facing the following problem.

The time is entered using a number entity
entity: number.time_2
Here I can set the time in minutes, e.g. from 1 to 160 minutes but I would like to be able to set minutes and hours here and have homeassistant send these as minutes to entity: number.zeit_2.

This is what it looks like here at the moment

But I would like it like this here

something else when the oven is started the entity: number.zeit_2 runs backwards

I hope you understand what I mean and can help me. Thanks

Create an Input Datetime helper set to time only, called Backofen. Put it on a dashboard.

Then create an automation:

trigger:
  - platform: state
    entity_id: input_datetime.backofen
action:
  - service: number.set_value
    target:
      entity_id: number.zeit_2
    data:
      value: >
        {% set s = states('input_datetime.backofen').split(':')[0]|int %}
        {% set m = states('input_datetime.backofen').split(':')[1]|int %}
        {{ s * 60 + m }}
1 Like

Thanks it worked