Sure, you are right, thanks for this hint!
Can you help me to put this together? I’ve tried a few different ways, but none of them worked…
Thank you for your help!
- id: steckdose1_luftfeuchtigkeit_on
alias: “Steckdose 1 Luftfeuchtigkeit on“
initial_state: true
trigger:
platform: template
value_template: "{{states('sensor.steckdose1_am2301_humidity') | float > ((states.input_number.schieber_steckdose1.state | float) + 2.5) }}"
action:
service: switch.turn_on
entity_id: switch.steckdose1
- id: steckdose1_luftfeuchtigkeit_off
alias: “Steckdose 1 Luftfeuchtigkeit off“
initial_state: true
trigger:
platform: template
value_template: "{{states('sensor.steckdose1_am2301_humidity') | float < ((states.input_number.schieber_steckdose1.state | float) - 2.5) }}"
action:
service: switch.turn_off
entity_id: switch.steckdose1