Added a SNMP based (Juniper) internet bandwidth monitor.

This commit is contained in:
2021-09-06 15:55:43 +02:00
parent 9575246cd5
commit 45126e79bb
7 changed files with 101 additions and 0 deletions

View File

@@ -309,3 +309,23 @@
- schlafzimmer
- wohnzimmer
mode: single
- id: snmp_monitor_traffic_in
alias: Monitor Traffic In
trigger:
platform: state
entity_id: sensor.snmp_wan_in
action:
- service: input_number.set_value
data_template:
entity_id: input_number.internet_traffic_delta_in
value: '{{ ((trigger.to_state.state | int - trigger.from_state.state | int) * 8 ) / ( as_timestamp(trigger.to_state.last_updated) - as_timestamp(trigger.from_state.last_updated) ) }}'
- id: snmp_monitor_traffic_out
alias: Monitor Traffic Out
trigger:
platform: state
entity_id: sensor.snmp_wan_out
action:
- service: input_number.set_value
data_template:
entity_id: input_number.internet_traffic_delta_out
value: '{{ ((trigger.to_state.state | int - trigger.from_state.state | int) * 8 ) / ( as_timestamp(trigger.to_state.last_updated) - as_timestamp(trigger.from_state.last_updated) ) }}'