Flow Details
This app reads a smart meter (or other power sensor) and shows it on the display. The template converts kW to W get rid of decimals and save space, but is easy to change. Requires LaMetric icon ID 44432 to be uploaded.
alias: Send Power Usage to Awtrix
description: ""
triggers:
- trigger: time_pattern
seconds: "0"
- trigger: state
entity_id:
- sensor.power_consumed
enabled: false
conditions: []
actions:
- action: mqtt.publish
metadata: {}
data:
qos: "0"
topic: awtrix_2fc2a8/custom/power
payload: |-
{
"text": "{{ (states("sensor.power_consumed") | float * 1000) | round | int }}W",
"textCase": 2,
"color": [255,0,0],
"icon": "44432",
"noScroll": true
}
evaluate_payload: false
mode: single
-- Flow first published on October 7, 2024.