2018-01-02 00:00:45 +00:00
|
|
|
#-------------------------------------------
|
|
|
|
# Network Related Packages
|
|
|
|
# @CCOSTAN
|
|
|
|
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
|
|
|
#-------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------
|
|
|
|
sensor:
|
|
|
|
- platform: template
|
|
|
|
sensors:
|
2018-01-19 17:51:32 +00:00
|
|
|
network:
|
|
|
|
friendly_name: 'Network Monitor'
|
|
|
|
value_template: >
|
|
|
|
{%- set domains = ['device_tracker'] -%}
|
|
|
|
{%- for domain in domains -%}
|
2018-01-19 20:55:12 +00:00
|
|
|
{%- for item in states[domain]
|
|
|
|
if (item.attributes.source_type is defined and item.state != 'home' and item.attributes.friendly_name not in
|
|
|
|
[
|
|
|
|
'Chromecast Audio 2',
|
2018-01-19 21:22:03 +00:00
|
|
|
'Entry Alarm Panel',
|
|
|
|
'Dash Button',
|
|
|
|
'Master Bedroom Roku',
|
|
|
|
'Brother Printer',
|
|
|
|
'Wii',
|
|
|
|
'Withings Scale'
|
|
|
|
])
|
|
|
|
and(as_timestamp(now()) - as_timestamp(item.last_changed)) > 600 -%}
|
|
|
|
{{ item.attributes.friendly_name }} - {{((as_timestamp(now()) - as_timestamp(item.last_changed))/60) | round() }} minutes
|
2018-01-19 17:51:32 +00:00
|
|
|
{%- if not loop.last -%}
|
2018-01-19 21:22:03 +00:00
|
|
|
{{'
|
|
|
|
'}}
|
2018-01-19 17:51:32 +00:00
|
|
|
{%- endif -%}
|
|
|
|
{%- endfor -%}
|
|
|
|
{%- endfor -%}
|
2018-01-19 20:55:12 +00:00
|
|
|
|
2018-01-02 00:00:45 +00:00
|
|
|
group:
|
|
|
|
network:
|
|
|
|
entities:
|
|
|
|
- sensor.ha_installed_version
|
|
|
|
- sensor.ha_uptime
|
|
|
|
- sensor.since_last_boot_templated
|
|
|
|
- sensor.disk_used_
|
|
|
|
- sensor.speedtest_download
|
|
|
|
- sensor.speedtest_upload
|
|
|
|
- binary_sensor.carlowink
|
2018-01-19 20:55:12 +00:00
|
|
|
- sensor.network
|
2018-01-02 00:00:45 +00:00
|
|
|
#-------------------------------------------------------------------------------------
|
|
|
|
automation:
|
|
|
|
- alias: 'Device Status'
|
|
|
|
hide_entity: True
|
|
|
|
trigger:
|
2018-01-19 20:55:12 +00:00
|
|
|
- platform: state
|
|
|
|
entity_id:
|
|
|
|
- sensor.network
|
|
|
|
- binary_sensor.carlowink
|
2018-01-02 00:00:45 +00:00
|
|
|
|
|
|
|
action:
|
|
|
|
- service: script.notify_engine
|
|
|
|
data_template:
|
2018-01-19 19:52:57 +00:00
|
|
|
value1: 'Offline Devices:'
|
2018-01-02 00:00:45 +00:00
|
|
|
value3: "{{ trigger.to_state.state }}"
|
|
|
|
who: 'carlo'
|
|
|
|
|
2018-01-19 20:55:12 +00:00
|
|
|
# - service: script.speech_engine
|
|
|
|
# data_template:
|
|
|
|
# value1: "The following Devices are in an Offline state {{ trigger.to_state.state }}"
|