Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/blueprints/battery_notes_battery_not_reported.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@ blueprint:
variables:
not_reported_notification: !input not_reported_notification
excluded_devices: !input excluded_devices
trigger:
- platform: event
triggers:
- trigger: event
event_type: battery_notes_battery_not_reported
alias: Battery not reported
condition:
conditions:
- condition: template
value_template: |-
{{ trigger.event.data.device_id not in excluded_devices}}
- alias: User pick
condition: !input additional_conditions
action:
actions:
- if:
- condition: template
value_template: '{{ not_reported_notification }}'
then:
- service: persistent_notification.create
- action: persistent_notification.create
data:
title: '{{ trigger.event.data.device_name }} Battery Not Reported'
message: 'The device has not reported its battery level for {{ trigger.event.data.battery_last_reported_days
Expand Down
10 changes: 5 additions & 5 deletions docs/blueprints/battery_notes_battery_replaced.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ blueprint:
selector:
action:

trigger:
- platform: event
triggers:
- trigger: event
event_type: battery_notes_battery_increased

condition:
conditions:
- alias: User pick
condition: !input additional_conditions

action:
- service: battery_notes.set_battery_replaced
actions:
- action: battery_notes.set_battery_replaced
data:
device_id: "{{ trigger.event.data.device_id }}"
source_entity_id: "{{ trigger.event.data.source_entity_id }}"
Expand Down
14 changes: 7 additions & 7 deletions docs/blueprints/battery_notes_battery_threshold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,28 @@ variables:
high_notification: !input high_notification
excluded_devices: !input excluded_devices

trigger:
- platform: event
triggers:
- trigger: event
event_type: battery_notes_battery_threshold
event_data:
battery_low: true
id: low
alias: Battery went low
- platform: event
- trigger: event
event_type: battery_notes_battery_threshold
event_data:
battery_low: false
id: high
alias: Battery went high

condition:
conditions:
- condition: template
value_template: |-
{{ trigger.event.data.device_id not in excluded_devices}}
- alias: User pick
condition: !input additional_conditions

action:
actions:
- choose:
- conditions:
- condition: trigger
Expand All @@ -85,7 +85,7 @@ action:
- condition: template
value_template: "{{ low_notification }}"
then:
- service: persistent_notification.create
- action: persistent_notification.create
data:
title: |
{{ trigger.event.data.device_name }} Battery Low
Expand All @@ -107,7 +107,7 @@ action:
- condition: template
value_template: "{{ low_notification }}"
then:
- service: persistent_notification.dismiss
- action: persistent_notification.dismiss
data:
notification_id: "battery_notes_threshold {{ trigger.event.data.device_id }}-{{ trigger.event.data.source_entity_id }}"
- alias: "Run user on high actions"
Expand Down
Loading