Skip to content

Commit

Permalink
Add exclusion on threshold blueprint
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codechimp committed Mar 22, 2024
1 parent 4a37140 commit a0b2b0a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions docs/blueprints/battery_notes_battery_threshold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ blueprint:
default: True
selector:
boolean:
excluded_devices:
name: Devices to exclude (Optional)
description: Devices that you do not want to trigger this automation.
default:
selector:
device:
multiple: true
entity:
- integration: battery_notes
on_low_actions:
name: On Low Actions
description: User actions to run on battery low. Use any event data via trigger.event.data.xxx
Expand All @@ -29,11 +38,12 @@ blueprint:
description: User actions to run on battery returning from low. Use any event data via trigger.event.data.xxx
default: []
selector:
action:
action:

variables:
low_notification: !input low_notification
high_notification: !input high_notification
excluded_devices: !input excluded_devices

trigger:
- platform: event
Expand All @@ -49,7 +59,10 @@ trigger:
id: high
alias: Battery went high

condition: []
condition:
- condition: template
value_template: |-
{{ trigger.event.data.device_id not in excluded_devices}}
action:
- choose:
Expand Down

0 comments on commit a0b2b0a

Please sign in to comment.