aimc
(Andrew Cockburn)
1
Is there any way to monitor multiple entities with the numeric state trigger? I want to do something like the following:
- alias: 'Battery Low Alert'
trigger:
platform: numeric_state
entity_id: sensor.basement_thermostat_battery, sensor.downstairs_thermostat_battery
below: 10
action:
service: notify.Pushover
data_template:
message: >
{{ trigger.entity_id|replace('sensor.', '')|replace('_', ' ')|capitalize }} is at {{ states(trigger.entity_id)}}%
title: ""
With one sensor it works fine, but if I add another one it actually seems to break all of my automations.
Tyfoon
(@Tyfoon)
2
Andrew, did you ever solve this on? I have the same Q
aimc
(Andrew Cockburn)
3
No - I have since moved all my automatons over to AppDaemon.
aaronwolen
(Aaron Wolen)
4
Bump. It feels like this should be possible since it works with state triggers.
ohadbenita
(Ohad Benita)
5
I’ve solved it using the following automation, hope this will be of help :
trigger:
- platform: numeric_state
entity_id:
- sensor.guest_bathroom_plant_battery
- sensor.grandpa_plant_battery
- sensor.entrance_plant_battery
below: 10
for:
hours: 1
condition:
condition: and
conditions:
- condition: time
after: '18:00:00'
before: '21:00:00'
- condition: state
entity_id: sensor.ohad_home
state: 'true'
action:
- service: notify.ios_ohad_iphone
data_template:
message: '{{ trigger.from_state.attributes.friendly_name }} plant sensor - battery low'
data:
push:
badge: 0
category: 'plantnotification'
Tested it and seems to work welll
2 Likes