First of all my installation is about 2 days old, sorry if this is obvious.
I’m trying to automate a battery level tracker for the various Zigbee sensors I have. I created 2 helpers, a sensor group with the “Min entity ID” attribute for the sensor with the lowest battery level, and a min/max value sensor to determine if any battery is below 5%. Not sure if this is the way to go but anyway. My automation looks like this:
alias: Battery monitor
description: ""
triggers:
- trigger: state
entity_id:
- sensor.batterier
attribute: min_entity_id
conditions:
- condition: state
entity_id: binary_sensor.batterigrans
attribute: position
state: Below
actions:
- action: persistent_notification.create
data:
title: Low battery
message: Swap battery for sensor {{ min_entity_id? }}
mode: single
I can’t figure out how to include the value from min_entity_id in the message?