Fixes and improvements for #83
State attributes added for cleanly listing which sensors are open/faulted
This commit is contained in:
@ -1429,16 +1429,10 @@
|
||||
data:
|
||||
title: Lockdown Issue
|
||||
notification_id: lockdown_issue
|
||||
message: 'I fucked up this notification, will fix later, but you still gotta
|
||||
issue, okbyeeeee {% set extdoors = expand(''binary_sensor.exterior_doors'')
|
||||
| selectattr(''state'',''eq'',''on'') | map(attribute=''name'') | list | join('',
|
||||
'') %} {% set windows = expand(''binary_sensor.windows'') | selectattr(''state'',''eq'',''on'')
|
||||
| map(attribute=''name'') | list | join('', '') %} A lockdown issue has been
|
||||
caused by the following sensors:
|
||||
message: '{% set faults = state_attr(''sensor.total_faults'',''faulted'') |
|
||||
join('', '') %} A lockdown issue has been caused by the following sensors:
|
||||
|
||||
Doors:{% if is_state(''binary_sensor.exterior_doors'',''on'') %} {{ extdoors
|
||||
}} {% else %} None {% endif %} Windows:{% if is_state(''binary_sensor.windows'',''on'')
|
||||
%} {{ windows }} {% else %} None {% endif %}'
|
||||
{{ faults }}'
|
||||
- service: script.text_notify
|
||||
data:
|
||||
type: critical
|
||||
@ -1446,16 +1440,10 @@
|
||||
%}\n tony\n{% else %}\n parents\n{% endif %}"
|
||||
title: Security Not Armed!
|
||||
tag: lockdown-issue
|
||||
message: 'I fucked up this notification, will fix later, but you still gotta
|
||||
issue, okbyeeeee {% set extdoors = expand(''binary_sensor.exterior_doors'')
|
||||
| selectattr(''state'',''eq'',''on'') | map(attribute=''name'') | list | join('',
|
||||
'') %} {% set windows = expand(''binary_sensor.windows'') | selectattr(''state'',''eq'',''on'')
|
||||
| map(attribute=''name'') | list | join('', '') %} A lockdown issue has been
|
||||
caused by the following sensors:
|
||||
message: '{% set faults = state_attr(''sensor.total_faults'',''faulted'') |
|
||||
join('', '') %} A lockdown issue has been caused by the following sensors:
|
||||
|
||||
Doors:{% if is_state(''binary_sensor.exterior_doors'',''on'') %} {{ extdoors
|
||||
}} {% else %} None {% endif %} Windows:{% if is_state(''binary_sensor.windows'',''on'')
|
||||
%} {{ windows }} {% else %} None {% endif %}'
|
||||
{{ faults }}'
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.basement_occupied
|
||||
|
Reference in New Issue
Block a user