Files
zorruno-homeassistant/packages/internet_traffic.yaml
T
2025-12-21 20:55:54 +13:00

26 lines
950 B
YAML

template:
- sensor:
- name: "Internet Download Traffic"
unique_id: internet_downtraffic
unit_of_measurement: "kB/s"
state_class: measurement
state: >
{{ state_attr('binary_sensor.edgeos_interface_pppoe0', 'KBytes/ps (Received)') | float(0) }}
- name: "Internet Upload Traffic"
unique_id: internet_uptraffic
unit_of_measurement: "kB/s"
state_class: measurement
state: >
{{ state_attr('binary_sensor.edgeos_interface_pppoe0', 'KBytes/ps (Sent)') | float(0) }}
- name: "Internet Total Traffic"
unique_id: internet_totaltraffic
unit_of_measurement: "kB/s"
state_class: measurement
state: >
{{
(state_attr('binary_sensor.edgeos_interface_pppoe0', 'KBytes/ps (Received)') | float(0))
+ (state_attr('binary_sensor.edgeos_interface_pppoe0', 'KBytes/ps (Sent)') | float(0))
}}