HA Automation to update ULANZI TC002 display running AWTRIXNG
alias: Solar Generation Now
description: ''
triggers:
- trigger: time_pattern
minutes: /2
conditions: null
actions:
- action: mqtt.publish
data:
topic: inverter/total/P_AC
payload: |
{{
{
"production": states("sensor.solar_power") | float
} | to_json
}}
- action: mqtt.publish
data:
topic: inverter/total/YieldDay
payload: |
{{
{
"YieldDay": states("sensor.hub_26767277_myenergi_hub_26767277_generated_today") | float * 1000
} | to_json
}}
- action: mqtt.publish
data:
topic: Battery
payload: |
{{
{
"soc": states("sensor.battery_charge") | float
} | to_json
}}
This is an update script that sends three Home Assistant entity values to its MQTT Server, that then broadcasts the values to an ULANZI TC002 running a weather script on the AWTRIXNG operating system.