Hi
I’m trying to develop an automation that sets a thermostat’s set-point from the payload of an incoming mqtt message. The automation currently looks like:
- alias: remote_shack_thermostat_control
trigger:
- platform: mqtt
topic: "hassio_2/climate/horstmann_secure_meters_hrt4_zw_thermostat_transmitter_heating_1_2/command"
action:
- service: "climate.set_temperature"
data_template:
entity_id: climate.horstmann_secure_meters_hrt4_zw_thermostat_transmitter_heating_1_2
temperature: '{{trigger.payload}}'
hvac_mode: heat
The automation triggers correctly but I get an error:
2019-10-21 17:09:36 ERROR (MainThread) [homeassistant.helpers.service] Error rendering data template: UndefinedError: 'trigger' is undefined
I chose trigger.payload
on the basis of other, working, automations.
Any clues?