I recently added a temperature sensor in my fridge, since my fridge needs to stay around 20 degrees. I have an automation working which turns the fridge on and off around 20 degrees, but sometimes I would like to change the target temperature. That is why I want to use an input slider. I have tried a lot of examples from this forum and the home assistant website, but always get an error.
- alias: Turn On Fridge
trigger:
platform: template
value_template: {{ states('sensor.fridge_temperature') > states('input_number.slider1') }}
condition:
- condition: state
entity_id: switch.beer_fridge
state: 'off'
action:
service: homeassistant.turn_on
entity_id: switch.beer_fridge
And this is the error I get:
Error loading /config/configuration.yaml: invalid key: âOrderedDict([(âstates(âsensor.fridge_temperatureâ) > states(âinput_number.slider1â)â, None)])â
in â/config/automations.yamlâ, line 32, column 0
Does someone know what is wrong with the value template?