Redid wan traffic collection and replaced the old clumsy way. Added usage_meters.
This commit is contained in:
@@ -343,30 +343,6 @@
|
||||
- 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)
|
||||
) }}'
|
||||
- id: '1632477389492'
|
||||
alias: Licht beim Heimkommen einschalten
|
||||
description: Nur während Dunkelphase
|
||||
|
Reference in New Issue
Block a user