From a0b2b0a098fe6bf41f6195941eebc70b117cc919 Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Fri, 22 Mar 2024 11:07:33 +0000 Subject: [PATCH] Add exclusion on threshold blueprint --- .../battery_notes_battery_threshold.yaml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/blueprints/battery_notes_battery_threshold.yaml b/docs/blueprints/battery_notes_battery_threshold.yaml index bf05cfb3d..6f24abf9f 100644 --- a/docs/blueprints/battery_notes_battery_threshold.yaml +++ b/docs/blueprints/battery_notes_battery_threshold.yaml @@ -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 @@ -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 @@ -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: