I am trying to set the measured temperature of a zigbee themostatic valve for a radiator (POPZ701721) with the value obtained from an external temperature sensor (Aqara T1).
I want to make this an automation that runs every X minutes.
I have the following code:
alias: Test_set_temperature
description: "Test script to set ambient temperature"
triggers:
- trigger: time_pattern # For testing, to be changed later.
seconds: "59"
conditions: []
actions:
- device_id: 4094bfe7542efb78f48d904cdc6610cc
domain: number
entity_id: 948625cdda07412b2866dcf882828a32
type: set_value
value: {{ states('sensor.woonkamer_temperatuur')}}
But when I try to run save the automation I get the following error:
Message malformed: expected float for dictionary value @ data[‘value’]
I have tried casting the value to a float value: {{ states('sensor.woonkamer_temperatuur')|float}}
, but I get the same error.
I also tried sending the value to my phone in a message, this does work, I get a message with the temperature in Celcius:
- device_id: a8d0ae82e05bd72c0d321463a04e56a5
alias: Stijn_telefoon
domain: mobile_app
type: notify
message: Test
title: "Temperatuur: {{ states('sensor.woonkamer_temperatuur') }}"
How can I use the value of sensor.woonkamer_temperatuur
to set the value of the thermostat valve?
I’m sorry for the noob question, I have experience with python, but I just can’t seem to wrap my head around how home assistant yaml is supposed to work…