This was the solution:
value_template: “{{((states.input_number.schieber_steckdose1.state | float) + 2.5) <= states(‘sensor.steckdose1_am2301_humidity’) | float }}”
Now I only need to combine these two automations into one - is this possible?
id: steckdose1_luftfeuchtigkeit_on
alias: “Steckdose 1 Luftfeuchtigkeit on“
initial_state: truetrigger:
platform: template
value_template: “{{((states.input_number.schieber_steckdose1.state | float) + 2.5) <= states(‘sensor.steckdose1_am2301_humidity’) | float }}”action:
service: switch.turn_on
entity_id: switch.steckdose1id: steckdose1_luftfeuchtigkeit_off
alias: “Steckdose 1 Luftfeuchtigkeit off“
initial_state: truetrigger:
platform: template
value_template: “{{((states.input_number.schieber_steckdose1.state | float) + 2.5) >= states(‘sensor.steckdose1_am2301_humidity’) | float }}”action:
service: switch.turn_off
entity_id: switch.steckdose1