Files
zorruno-homeassistant/sensor/internet_traffic.yaml
2022-10-11 15:40:40 +13:00

21 lines
843 B
YAML

- platform: template
sensors:
sensor_internet_downtraffic:
friendly_name: "Internet Download Traffic"
unit_of_measurement: "kB/s"
value_template: "{{ state_attr('binary_sensor.edgeos_interface_pppoe0', 'KBytes/ps (Received)') }}"
- platform: template
sensors:
sensor_internet_uptraffic:
friendly_name: "Internet Upload Traffic"
unit_of_measurement: "kB/s"
value_template: "{{ state_attr('binary_sensor.edgeos_interface_pppoe0', 'KBytes/ps (Sent)') }}"
- platform: template
sensors:
sensor_internet_totaltraffic:
friendly_name: "Internet Total Traffic"
unit_of_measurement: "kB/s"
value_template: "{{ state_attr('binary_sensor.edgeos_interface_pppoe0', 'KBytes/ps (Received)') |float + state_attr('binary_sensor.edgeos_interface_pppoe0', 'KBytes/ps (Sent)') | float }}"