Without seeing how you defined einschaltdauer
this is difficult to answer. Please ensure you include all relevant information in future questions.
Assuming einschaltdauer
contains the input number entity id and not the value:
- if:
- condition: template
value_template: "{{ states(einschaltdauer)|int < 60 }}"
then:
- service: homematicip_local.switch_set_on_time
data:
on_time: "{{ states(einschaltdauer)|int * 60 }}"
target:
entity_id: "{{homematic_kanal_entity}}"
If einschaltdauer
contains the value of the input number then you would do this:
- if:
- condition: template
value_template: "{{ einschaltdauer|int < 60 }}"
then:
- service: homematicip_local.switch_set_on_time
data:
on_time: "{{ einschaltdauer|int * 60 }}"
target:
entity_id: "{{homematic_kanal_entity}}"