Some sensors to monitor my trash internet

This commit is contained in:
2022-07-28 03:47:50 -04:00
parent dbfb9e8d2a
commit b9dda5c84f

View File

@ -3,3 +3,42 @@ sensor:
name: Lines of Code name: Lines of Code
command: "find /config -name '*.yaml' | xargs cat | wc -l" command: "find /config -name '*.yaml' | xargs cat | wc -l"
scan_interval: 20000 scan_interval: 20000
- platform: template
sensors:
min_ping:
friendly_name: "Min Ping"
value_template: "{{ state_attr('binary_sensor.internet','round_trip_time_min') }}"
availability_template: >-
{% if is_state('binary_sensor.internet','on') %}
true
{% else %}
false
{% endif %}
unit_of_measurement: "ms"
avg_ping:
friendly_name: "Avg Ping"
value_template: "{{ state_attr('binary_sensor.internet','round_trip_time_avg') }}"
availability_template: >-
{% if is_state('binary_sensor.internet','on') %}
true
{% else %}
false
{% endif %}
unit_of_measurement: "ms"
max_ping:
friendly_name: "Max Ping"
value_template: "{{ state_attr('binary_sensor.internet','round_trip_time_max') }}"
availability_template: >-
{% if is_state('binary_sensor.internet','on') %}
true
{% else %}
false
{% endif %}
unit_of_measurement: "ms"
binary_sensor:
- platform: ping
name: Internet
host: 8.8.8.8
scan_interval: 15