|
|
|
@ -14,8 +14,7 @@ sensor:
|
|
|
|
{%- set domains = ['device_tracker'] -%}
|
|
|
|
{%- set domains = ['device_tracker'] -%}
|
|
|
|
{%- for domain in domains -%}
|
|
|
|
{%- for domain in domains -%}
|
|
|
|
{%- for item in states[domain] if (item.attributes.source_type is defined and item.state != 'home') -%}
|
|
|
|
{%- for item in states[domain] if (item.attributes.source_type is defined and item.state != 'home') -%}
|
|
|
|
{{ item.attributes.friendly_name }} -
|
|
|
|
{{ item.attributes.friendly_name }}
|
|
|
|
{{item.state}}
|
|
|
|
|
|
|
|
{%- if not loop.last -%}
|
|
|
|
{%- if not loop.last -%}
|
|
|
|
{{', '}}
|
|
|
|
{{', '}}
|
|
|
|
{%- endif -%}
|
|
|
|
{%- endif -%}
|
|
|
|
@ -40,19 +39,15 @@ automation:
|
|
|
|
trigger:
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
- platform: state
|
|
|
|
entity_id:
|
|
|
|
entity_id:
|
|
|
|
- sensor.wii
|
|
|
|
- sensor.network
|
|
|
|
to: 'Offline'
|
|
|
|
|
|
|
|
for:
|
|
|
|
|
|
|
|
minutes: 5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
action:
|
|
|
|
action:
|
|
|
|
- service: script.notify_engine
|
|
|
|
- service: script.notify_engine
|
|
|
|
data_template:
|
|
|
|
data_template:
|
|
|
|
value1: 'Device Status:'
|
|
|
|
value1: 'Offline Devices:'
|
|
|
|
value2: "{{ trigger.to_state.attributes.friendly_name }} is "
|
|
|
|
|
|
|
|
value3: "{{ trigger.to_state.state }}"
|
|
|
|
value3: "{{ trigger.to_state.state }}"
|
|
|
|
who: 'carlo'
|
|
|
|
who: 'carlo'
|
|
|
|
|
|
|
|
|
|
|
|
- service: script.speech_engine
|
|
|
|
- service: script.speech_engine
|
|
|
|
data_template:
|
|
|
|
data_template:
|
|
|
|
value1: "{{ trigger.to_state.attributes.friendly_name }} is now {{ trigger.to_state.state }}"
|
|
|
|
value1: "The following Devices are in an Offline state {{ trigger.to_state.state }}"
|
|
|
|
|