After Ray was so kind to help me with the MQTT topic to use to update the temperature from an external sensor I use this automation with HA to update every 20sec from an external sensor I have already in HA.
sensor.livingroom_temperature is the sensor already in HA which I have chosen to use for the AB. If no update is provided within 30 seconds the AB will use the internal sensor again.
Code:
alias: "AB Remote Temp"
description: ""
triggers:
- trigger: time_pattern
seconds: /20
actions:
- action: mqtt.publish
metadata: {}
data:
evaluate_payload: false
qos: 0
retain: false
topic: AfterburnerXXXXXX/cmd/TempRemote
payload: "{{ states('sensor.livingroom_temperature') }}"
sensor.livingroom_temperature is the sensor already in HA which I have chosen to use for the AB. If no update is provided within 30 seconds the AB will use the internal sensor again.