Switched SNMP traffic sensors to 64bit counters and into modern confg format.
This commit is contained in:
19
sensors.yaml
19
sensors.yaml
@@ -17,12 +17,16 @@
|
||||
name: snmp_wan_in
|
||||
host: !secret router_ip
|
||||
community: !secret router_community
|
||||
baseoid: .1.3.6.1.2.1.2.2.1.10.511
|
||||
baseoid: .1.3.6.1.2.1.31.1.1.1.6.511
|
||||
version: 2c
|
||||
unit_of_measurement: "Octets"
|
||||
- platform: snmp
|
||||
name: snmp_wan_out
|
||||
host: !secret router_ip
|
||||
community: !secret router_community
|
||||
baseoid: .1.3.6.1.2.1.2.2.1.16.511
|
||||
baseoid: .1.3.6.1.2.1.31.1.1.1.10.511
|
||||
version: 2c
|
||||
unit_of_measurement: "Octets"
|
||||
|
||||
- platform: derivative
|
||||
source: sensor.snmp_wan_in
|
||||
@@ -35,17 +39,6 @@
|
||||
unit: B
|
||||
name: wan_out_derivative
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
internet_speed_in:
|
||||
friendly_name: 'Internet Speed IN'
|
||||
value_template: "{{ (( states('sensor.wan_in_derivative') | float * 8 / 1000000 ) | round(2)) }}"
|
||||
unit_of_measurement: 'Mbps'
|
||||
internet_speed_out:
|
||||
friendly_name: 'Internet Speed OUT'
|
||||
value_template: "{{ (( states('sensor.wan_out_derivative') | float * 8 / 1000000 ) | round(2)) }}"
|
||||
unit_of_measurement: 'Mbps'
|
||||
|
||||
- platform: statistics
|
||||
name: 'WAN Traffic In'
|
||||
state_characteristic: mean
|
||||
|
Reference in New Issue
Block a user