im using a mqtt gateway to control my heater. currently its configured by outside temperature. the gateway can emulate a room thermostate, which value has to be set manually. i want to automate this.
how can i get the value of my aqara thermostate every few seconds / minutes and put this into another entity? i cant find a working way to do this, i think im just overcomplicating it , surely this must be really easy?
triggers:
- trigger: state # this trigggers on all valid temperature changes
entity_id: sensor.temperature # this is where your Aqara sensor goes
not_to:
- unavailable
- unknown
actions:
- action: climate.set_temperature
target:
entity_id: climate.heater
data:
temperature: "{{ trigger.to_state.state }}"
You didn’t specify what sort of entity you want save the temperature to so I just made up an example action that sets a thermostat temperature. The important part is "{{ trigger.to_state.state }}" this is the value your sensor changed to.
Unfortunately no example this time but most pages have them. So you want the number.set_value action
triggers:
- trigger: state # this trigggers on all valid temperature changes
entity_id: sensor.temperature # this is where your Aqara sensor goes
not_to:
- unavailable
- unknown
actions:
- action: number.set_vaue
target:
entity_id: number.thermostat_hc2_room_temperature_from_remote
data:
value: "{{ trigger.to_state.state }}"