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