Added unique_ids
This commit is contained in:
parent
083cdbb857
commit
bf3b4e5e81
@ -1,6 +1,7 @@
|
|||||||
- sensor:
|
- sensor:
|
||||||
# Raspberry Pi CPU temp
|
# Raspberry Pi CPU temp
|
||||||
name: "CPU Temp"
|
name: "CPU Temp"
|
||||||
|
unique_id: '4144237916258'
|
||||||
command: "cat /sys/class/thermal/thermal_zone0/temp"
|
command: "cat /sys/class/thermal/thermal_zone0/temp"
|
||||||
unit_of_measurement: "°C"
|
unit_of_measurement: "°C"
|
||||||
value_template: "{{ value | multiply(0.001) | round(1) }}"
|
value_template: "{{ value | multiply(0.001) | round(1) }}"
|
||||||
|
11
sensors.yaml
11
sensors.yaml
@ -15,6 +15,7 @@
|
|||||||
# SNMP (Juniper) router traffic sensor
|
# SNMP (Juniper) router traffic sensor
|
||||||
- platform: snmp
|
- platform: snmp
|
||||||
name: snmp_wan_in
|
name: snmp_wan_in
|
||||||
|
unique_id: '3303381540758'
|
||||||
host: !secret router_ip
|
host: !secret router_ip
|
||||||
community: !secret router_community
|
community: !secret router_community
|
||||||
baseoid: .1.3.6.1.2.1.31.1.1.1.6.511
|
baseoid: .1.3.6.1.2.1.31.1.1.1.6.511
|
||||||
@ -22,6 +23,7 @@
|
|||||||
unit_of_measurement: "Octets"
|
unit_of_measurement: "Octets"
|
||||||
- platform: snmp
|
- platform: snmp
|
||||||
name: snmp_wan_out
|
name: snmp_wan_out
|
||||||
|
unique_id: '1573258703922'
|
||||||
host: !secret router_ip
|
host: !secret router_ip
|
||||||
community: !secret router_community
|
community: !secret router_community
|
||||||
baseoid: .1.3.6.1.2.1.31.1.1.1.10.511
|
baseoid: .1.3.6.1.2.1.31.1.1.1.10.511
|
||||||
@ -29,11 +31,13 @@
|
|||||||
unit_of_measurement: "Octets"
|
unit_of_measurement: "Octets"
|
||||||
|
|
||||||
- platform: derivative
|
- platform: derivative
|
||||||
|
unique_id: '5853787105973'
|
||||||
source: sensor.snmp_wan_in
|
source: sensor.snmp_wan_in
|
||||||
unit_time: s
|
unit_time: s
|
||||||
unit: B
|
unit: B
|
||||||
name: wan_in_derivative
|
name: wan_in_derivative
|
||||||
- platform: derivative
|
- platform: derivative
|
||||||
|
unique_id: '2245248666397'
|
||||||
source: sensor.snmp_wan_out
|
source: sensor.snmp_wan_out
|
||||||
unit_time: s
|
unit_time: s
|
||||||
unit: B
|
unit: B
|
||||||
@ -41,11 +45,13 @@
|
|||||||
|
|
||||||
- platform: statistics
|
- platform: statistics
|
||||||
name: 'WAN Traffic In'
|
name: 'WAN Traffic In'
|
||||||
|
unique_id: '9081721471264'
|
||||||
state_characteristic: mean
|
state_characteristic: mean
|
||||||
entity_id: sensor.internet_speed_in
|
entity_id: sensor.internet_speed_in
|
||||||
sampling_size: 10
|
sampling_size: 10
|
||||||
- platform: statistics
|
- platform: statistics
|
||||||
name: 'WAN Traffic Out'
|
name: 'WAN Traffic Out'
|
||||||
|
unique_id: '8688955223027'
|
||||||
state_characteristic: mean
|
state_characteristic: mean
|
||||||
entity_id: sensor.internet_speed_out
|
entity_id: sensor.internet_speed_out
|
||||||
sampling_size: 10
|
sampling_size: 10
|
||||||
@ -54,18 +60,21 @@
|
|||||||
sensors:
|
sensors:
|
||||||
sun_rising_template:
|
sun_rising_template:
|
||||||
friendly_name: "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') }}"
|
value_template: "{{ as_timestamp(states.sun.sun.attributes.next_rising) | timestamp_custom ('%H:%M') }}"
|
||||||
|
|
||||||
- platform: template
|
- platform: template
|
||||||
sensors:
|
sensors:
|
||||||
sun_setting_template:
|
sun_setting_template:
|
||||||
friendly_name: "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') }}"
|
value_template: "{{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom ('%H:%M') }}"
|
||||||
|
|
||||||
# Sensor for Riemann sum of energy import (W -> Wh)
|
# Sensor for Riemann sum of energy import (W -> Wh)
|
||||||
- platform: integration
|
- platform: integration
|
||||||
source: sensor.power_import
|
source: sensor.power_import
|
||||||
name: energy_import_sum
|
name: energy_import_sum
|
||||||
|
unique_id: '6355740355352'
|
||||||
unit_prefix: k
|
unit_prefix: k
|
||||||
round: 2
|
round: 2
|
||||||
method: left
|
method: left
|
||||||
@ -74,6 +83,7 @@
|
|||||||
- platform: integration
|
- platform: integration
|
||||||
source: sensor.power_export
|
source: sensor.power_export
|
||||||
name: energy_export_sum
|
name: energy_export_sum
|
||||||
|
unique_id: '6978829126367'
|
||||||
unit_prefix: k
|
unit_prefix: k
|
||||||
round: 2
|
round: 2
|
||||||
method: left
|
method: left
|
||||||
@ -82,6 +92,7 @@
|
|||||||
- platform: integration
|
- platform: integration
|
||||||
source: sensor.power_consumption
|
source: sensor.power_consumption
|
||||||
name: energy_consumption_sum
|
name: energy_consumption_sum
|
||||||
|
unique_id: '8749045190416'
|
||||||
unit_prefix: k
|
unit_prefix: k
|
||||||
round: 2
|
round: 2
|
||||||
method: left
|
method: left
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
- select:
|
- select:
|
||||||
- name: "All WLED effects"
|
- name: "All WLED effects"
|
||||||
|
unique_id: '6641823075755'
|
||||||
state: "{{ states('input_text.wled_effekt') }}"
|
state: "{{ states('input_text.wled_effekt') }}"
|
||||||
icon: mdi:firework
|
icon: mdi:firework
|
||||||
options: >
|
options: >
|
||||||
@ -12,6 +13,7 @@
|
|||||||
value: "{{ option }}"
|
value: "{{ option }}"
|
||||||
- select:
|
- select:
|
||||||
- name: "Available Media Players"
|
- name: "Available Media Players"
|
||||||
|
unique_id: '6284128947660'
|
||||||
state: "{{ states('input_text.selected_media_player') }}"
|
state: "{{ states('input_text.selected_media_player') }}"
|
||||||
options: >
|
options: >
|
||||||
{{ states.media_player
|
{{ states.media_player
|
||||||
@ -25,6 +27,7 @@
|
|||||||
value: "{{ option }}"
|
value: "{{ option }}"
|
||||||
- sensor:
|
- sensor:
|
||||||
- name: "power_other"
|
- name: "power_other"
|
||||||
|
unique_id: '5579422933393'
|
||||||
unit_of_measurement: "W"
|
unit_of_measurement: "W"
|
||||||
icon: mdi:flash
|
icon: mdi:flash
|
||||||
state: >
|
state: >
|
||||||
@ -55,6 +58,7 @@
|
|||||||
- sensor:
|
- sensor:
|
||||||
# Template sensor for values of power import (active_power > 0)
|
# Template sensor for values of power import (active_power > 0)
|
||||||
- name: power_import
|
- name: power_import
|
||||||
|
unique_id: '2385816278013'
|
||||||
unit_of_measurement: 'W'
|
unit_of_measurement: 'W'
|
||||||
state: >
|
state: >
|
||||||
{% if (states('sensor.line_power_channel_a_power')|float + states('sensor.line_power_channel_b_power')|float + states('sensor.line_power_channel_c_power')|float) > 0 %}
|
{% if (states('sensor.line_power_channel_a_power')|float + states('sensor.line_power_channel_b_power')|float + states('sensor.line_power_channel_c_power')|float) > 0 %}
|
||||||
@ -70,6 +74,7 @@
|
|||||||
|
|
||||||
# Template sensor for values of power export (active_power < 0)
|
# Template sensor for values of power export (active_power < 0)
|
||||||
- name: power_export
|
- name: power_export
|
||||||
|
unique_id: '9143524256421'
|
||||||
unit_of_measurement: 'W'
|
unit_of_measurement: 'W'
|
||||||
state: >
|
state: >
|
||||||
{% if (states('sensor.line_power_channel_a_power')|float + states('sensor.line_power_channel_b_power')|float + states('sensor.line_power_channel_c_power')|float) < 0 %}
|
{% if (states('sensor.line_power_channel_a_power')|float + states('sensor.line_power_channel_b_power')|float + states('sensor.line_power_channel_c_power')|float) < 0 %}
|
||||||
@ -85,6 +90,7 @@
|
|||||||
|
|
||||||
# Template sensor for values of power consumption
|
# Template sensor for values of power consumption
|
||||||
- name: power_consumption
|
- name: power_consumption
|
||||||
|
unique_id: '3502047649408'
|
||||||
unit_of_measurement: 'W'
|
unit_of_measurement: 'W'
|
||||||
state: >
|
state: >
|
||||||
{% if (states('sensor.power_export')|float(0)) > 0 and (states('sensor.balkonkraftwerk_power')|float(0) - states('sensor.power_export')|float(0)) < 0 %}
|
{% if (states('sensor.power_export')|float(0)) > 0 and (states('sensor.balkonkraftwerk_power')|float(0) - states('sensor.power_export')|float(0)) < 0 %}
|
||||||
@ -101,6 +107,7 @@
|
|||||||
|
|
||||||
# Internet Speed template sensor
|
# Internet Speed template sensor
|
||||||
- name: internet_speed_in
|
- name: internet_speed_in
|
||||||
|
unique_id: '9519483670666'
|
||||||
state: >
|
state: >
|
||||||
{{ (( states('sensor.wan_in_derivative') | float * 8 / 1000000 ) | round(2)) }}
|
{{ (( states('sensor.wan_in_derivative') | float * 8 / 1000000 ) | round(2)) }}
|
||||||
unit_of_measurement: 'Mbps'
|
unit_of_measurement: 'Mbps'
|
||||||
|
Loading…
Reference in New Issue
Block a user