Added unique_ids

This commit is contained in:
2024-10-08 12:59:18 +02:00
parent 083cdbb857
commit bf3b4e5e81
3 changed files with 20 additions and 1 deletions

View File

@@ -15,6 +15,7 @@
# SNMP (Juniper) router traffic sensor
- platform: snmp
name: snmp_wan_in
unique_id: '3303381540758'
host: !secret router_ip
community: !secret router_community
baseoid: .1.3.6.1.2.1.31.1.1.1.6.511
@@ -22,6 +23,7 @@
unit_of_measurement: "Octets"
- platform: snmp
name: snmp_wan_out
unique_id: '1573258703922'
host: !secret router_ip
community: !secret router_community
baseoid: .1.3.6.1.2.1.31.1.1.1.10.511
@@ -29,11 +31,13 @@
unit_of_measurement: "Octets"
- platform: derivative
unique_id: '5853787105973'
source: sensor.snmp_wan_in
unit_time: s
unit: B
name: wan_in_derivative
- platform: derivative
unique_id: '2245248666397'
source: sensor.snmp_wan_out
unit_time: s
unit: B
@@ -41,11 +45,13 @@
- platform: statistics
name: 'WAN Traffic In'
unique_id: '9081721471264'
state_characteristic: mean
entity_id: sensor.internet_speed_in
sampling_size: 10
- platform: statistics
name: 'WAN Traffic Out'
unique_id: '8688955223027'
state_characteristic: mean
entity_id: sensor.internet_speed_out
sampling_size: 10
@@ -54,18 +60,21 @@
sensors:
sun_rising_template:
friendly_name: "Sun Rising Template"
unique_id: '0680294616247'
value_template: "{{ as_timestamp(states.sun.sun.attributes.next_rising) | timestamp_custom ('%H:%M') }}"
- platform: template
sensors:
sun_setting_template:
friendly_name: "Sun Setting Template"
unique_id: '8298170865533'
value_template: "{{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom ('%H:%M') }}"
# Sensor for Riemann sum of energy import (W -> Wh)
- platform: integration
source: sensor.power_import
name: energy_import_sum
unique_id: '6355740355352'
unit_prefix: k
round: 2
method: left
@@ -74,6 +83,7 @@
- platform: integration
source: sensor.power_export
name: energy_export_sum
unique_id: '6978829126367'
unit_prefix: k
round: 2
method: left
@@ -82,6 +92,7 @@
- platform: integration
source: sensor.power_consumption
name: energy_consumption_sum
unique_id: '8749045190416'
unit_prefix: k
round: 2
method: left