i am trying to write a condition that compares the temperature in the room with a helper ( target temperature) in an automation.
alias: aaa_HZ_WohnEsszimmer
description: ""
trigger:
- platform: time_pattern
minutes: "5"
condition:
- condition: template
value_template: >-
{{(states('sensor.thermometer_wohnzimmer_temperature') | float ) <
(states('input_number.hz_solltemperatur_wohnesszimmer') | float)}}
action:
- service: persistent_notification.create
data:
title: Notification Title
message: >-
The state of the sensor is {{
states('sensor.thermometer_wohnzimmer_temperature') }} The helpers value
is {{states.input_number.hz_solltemperatur_wohnesszimmer.state }}
ConditionResult is
{{(states.sensor.thermometer_wohnzimmer_temperature.state | float ) <
(states.input_number.hz_solltemperatur_wohnesszimmer.state | float)}}
enabled: true
mode: single
The notification shows the right values:
“The state of the sensor is 21.88 The helpers value is 15.5 ConditionResult is False”
But the action is always triggert.
where is my mistake?