Files
zorruno-homeassistant/packages/internet_traffic.yaml.bak
T
2026-07-22 22:15:25 +12:00

26 lines
950 B
Plaintext

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))
}}