Hi all!
Have been playing around with {{ trigger.id }} but can’t seem to get it to work fully. When I have one ID in each action it works but not when putting them together.
Scenario:
Your phone is charging and when the battery reaches 80/90/95% a notification will be sent and a separate notification when the battery reaches 100%. My plan forward is to have the notification in TTS but for now I just want to get this to work
- alias: 'Test: Noftiy multiple IDs'
trigger:
- id: '80'
platform: numeric_state
above: '80'
below: '89'
entity_id: sensor.yourphonesname_battery_level
- id: '90'
platform: numeric_state
above: '90'
below: '94'
entity_id: sensor.yourphonesname_battery_level
- id: '95'
platform: numeric_state
above: '95'
below: '98'
entity_id: sensor.yourphonesname_battery_level
- id: '100'
platform: numeric_state
above: '99'
entity_id: sensor.yourphonesname_battery_level
action:
- choose:
- conditions:
- condition: trigger
id: '80'
- condition: trigger
id: '90'
- condition: trigger
id: '95'
sequence:
- service: notify.mobile_app_yourphonesname
data:
title: 'Charged'
message: 'Phone is now charged to {{ trigger.id }}'
- conditions:
- condition: trigger
id: '100'
sequence:
- service: notify.mobile_app_yourphonesname
data:
title: 'Charged'
message: 'Phone is now fully charged'
Any thoughts on way this is not working and what needs to be changed?
Thanks in advance!