Flow Details
Long Description
This automation monitors your Tesla Powerwall battery and sends updates via MQTT. It triggers when Home Assistant starts and whenever the battery power sensor changes.
1. Battery Charge and Power Status
- Reads the battery state of charge (
sensor.powerwall_3_percentage_charged) and rounds it to the nearest integer. - Reads the battery power (
sensor.powerwall_3_battery_power) to determine if the battery is:-
Charging (
power < 0) -
Discharging (
power > 0) -
Idle (
power = 0)
-
Charging (
2. Dynamic Icon Selection
-
Based on the charge level and battery mode, a numeric icon ID is selected.
-
Icon numbers used in this automation are:
Charging mode icons:
32047, 32049, 32050, 32051, 32052, 32053Discharging mode icons:
32059, 32058, 32057, 32056, 32055, 32054Idle/Other mode icons:
13735, 13732, 13731, 13725, 13734 -
To select or verify these icons, open the Awtrix web interface in your browser using the device's IP address. Navigate to the Icons page in the GUI, and you can browse or copy the numeric icon IDs directly. This ensures you are using valid icons that exist in your Awtrix installation.
-
Initially didn't work unless I downloaded them myself hence why I haven't included them below.
3. MQTT Payload Construction
- Chooses the correct state for the icon
- Publishes a status bar on the bottom
4. Automation Mode
- Runs in
singlemode, ensuring updates are sent sequentially without overlap.
Effectively, this automation provides real-time battery status updates, including charge level and mode, through MQTT, with visual feedback via the selected icons.
Shout out to: https://flows.blueforcer.de/flow/QE6B5QWRoMq0 for the inspiration.