Skip to content

Instantly share code, notes, and snippets.

@svewag
Created September 4, 2023 18:03
Show Gist options
  • Save svewag/0b26212a56601dcd8afd71adb23d07ff to your computer and use it in GitHub Desktop.
Save svewag/0b26212a56601dcd8afd71adb23d07ff to your computer and use it in GitHub Desktop.
Awtrix Automation HA
alias: Awtrix Uhr
description: ""
trigger:
- platform: time_pattern
minutes: /1
condition: []
action:
- if:
- condition: numeric_state
entity_id: sensor.tesla_battery
below: 30
- condition: state
entity_id: binary_sensor.tesla_charging
state: "off"
- condition: not
conditions:
- condition: state
entity_id: device_tracker.tesla_location_tracker
state: not_home
then:
- service: mqtt.publish
data:
topic: awtrix/custom/tesla-battery
qos: 0
retain: false
payload: "{\"icon\": \"13728\", \"text\":\"{{states.sensor.tesla_battery.state}} %\" }"
else:
- service: mqtt.publish
data:
topic: awtrix/custom/tesla-battery
qos: 0
retain: false
payload: "{}"
alias: Tesla Akku < 30%
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment