54 lines
1.6 KiB
YAML
Executable File
54 lines
1.6 KiB
YAML
Executable File
#-------------------------------------------
|
|
# Network Related Packages
|
|
# @CCOSTAN
|
|
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
|
#-------------------------------------------
|
|
|
|
#-------------------------------------------
|
|
sensor:
|
|
- platform: template
|
|
sensors:
|
|
network:
|
|
friendly_name: 'Network Monitor'
|
|
value_template: >
|
|
{%- set domains = ['device_tracker'] -%}
|
|
{%- for domain in domains -%}
|
|
{%- for item in states[domain] if (item.attributes.source_type is defined and item.state != 'home') -%}
|
|
{{ item.attributes.friendly_name }}
|
|
{%- if not loop.last -%}
|
|
{{', '}}
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
{%- endfor -%}
|
|
#-------------------------------------------
|
|
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
|
|
|
|
#-------------------------------------------------------------------------------------
|
|
automation:
|
|
- alias: 'Device Status'
|
|
hide_entity: True
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- sensor.network
|
|
|
|
action:
|
|
- service: script.notify_engine
|
|
data_template:
|
|
value1: 'Offline Devices:'
|
|
value3: "{{ trigger.to_state.state }}"
|
|
who: 'carlo'
|
|
|
|
- service: script.speech_engine
|
|
data_template:
|
|
value1: "The following Devices are in an Offline state {{ trigger.to_state.state }}"
|