Compare commits
3 Commits
8b43bf239b
...
fb4e6a9f41
Author | SHA1 | Date | |
---|---|---|---|
fb4e6a9f41 | |||
cfcbdeea9d | |||
6fdacdc6e9 |
@ -26,8 +26,6 @@
|
|||||||
entities:
|
entities:
|
||||||
- sun.sun # Don't record sun data
|
- sun.sun # Don't record sun data
|
||||||
- sensor.fritzbox_device_uptime
|
- sensor.fritzbox_device_uptime
|
||||||
- sensor.snmp_wan_in
|
|
||||||
- sensor.snmp_wan_out
|
|
||||||
- sensor.time
|
- sensor.time
|
||||||
# event_types:
|
# event_types:
|
||||||
# - call_service # Don't record service calls
|
# - call_service # Don't record service calls
|
||||||
|
19
sensors.yaml
19
sensors.yaml
@ -17,12 +17,16 @@
|
|||||||
name: snmp_wan_in
|
name: snmp_wan_in
|
||||||
host: !secret router_ip
|
host: !secret router_ip
|
||||||
community: !secret router_community
|
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
|
- platform: snmp
|
||||||
name: snmp_wan_out
|
name: snmp_wan_out
|
||||||
host: !secret router_ip
|
host: !secret router_ip
|
||||||
community: !secret router_community
|
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
|
- platform: derivative
|
||||||
source: sensor.snmp_wan_in
|
source: sensor.snmp_wan_in
|
||||||
@ -35,17 +39,6 @@
|
|||||||
unit: B
|
unit: B
|
||||||
name: wan_out_derivative
|
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
|
- platform: statistics
|
||||||
name: 'WAN Traffic In'
|
name: 'WAN Traffic In'
|
||||||
state_characteristic: mean
|
state_characteristic: mean
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
{{ (total + solar - raumduft - keller - musik - bett - heimkino_sz - deko - schreibtisch - serverraum - heimkino_wz - spieleschrank) | round(1) }}
|
{{ (total + solar - raumduft - keller - musik - bett - heimkino_sz - deko - schreibtisch - serverraum - heimkino_wz - spieleschrank) | round(1) }}
|
||||||
device_class: power
|
device_class: power
|
||||||
state_class: measurement
|
state_class: measurement
|
||||||
attributes:
|
attributes:
|
||||||
last_reset: '1970-01-01T00:00:00+00:00'
|
last_reset: '1970-01-01T00:00:00+00:00'
|
||||||
|
|
||||||
# Shelly 3EM cumulative sensors (incl. PV)
|
# Shelly 3EM cumulative sensors (incl. PV)
|
||||||
@ -36,9 +36,9 @@
|
|||||||
device_class: power
|
device_class: power
|
||||||
state_class: measurement
|
state_class: measurement
|
||||||
icon: mdi:transmission-tower-export
|
icon: mdi:transmission-tower-export
|
||||||
attributes:
|
attributes:
|
||||||
last_reset: '1970-01-01T00:00:00+00:00'
|
last_reset: '1970-01-01T00:00:00+00:00'
|
||||||
|
|
||||||
# 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
|
||||||
unit_of_measurement: 'W'
|
unit_of_measurement: 'W'
|
||||||
@ -51,7 +51,7 @@
|
|||||||
device_class: power
|
device_class: power
|
||||||
state_class: measurement
|
state_class: measurement
|
||||||
icon: mdi:transmission-tower-import
|
icon: mdi:transmission-tower-import
|
||||||
attributes:
|
attributes:
|
||||||
last_reset: '1970-01-01T00:00:00+00:00'
|
last_reset: '1970-01-01T00:00:00+00:00'
|
||||||
|
|
||||||
# Template sensor for values of power consumption
|
# Template sensor for values of power consumption
|
||||||
@ -60,12 +60,26 @@
|
|||||||
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 %}
|
||||||
{% elif (states('sensor.power_export')|float(0)) > 0 and (states('sensor.balkonkraftwerk_power')|float(0) - states('sensor.power_export')|float(0)) > 0 %}
|
{% elif (states('sensor.power_export')|float(0)) > 0 and (states('sensor.balkonkraftwerk_power')|float(0) - states('sensor.power_export')|float(0)) > 0 %}
|
||||||
{{ ((states('sensor.balkonkraftwerk_power')|float(0)) - states('sensor.power_export')|float(0)) | round(1) }}
|
{{ ((states('sensor.balkonkraftwerk_power')|float(0)) - states('sensor.power_export')|float(0)) | round(1) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ (states('sensor.power_import')|float(0) + states('sensor.balkonkraftwerk_power')|float(0)) | round(1) }}
|
{{ (states('sensor.power_import')|float(0) + states('sensor.balkonkraftwerk_power')|float(0)) | round(1) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
device_class: power
|
device_class: power
|
||||||
state_class: measurement
|
state_class: measurement
|
||||||
icon: mdi:home-lightning-bolt
|
icon: mdi:home-lightning-bolt
|
||||||
attributes:
|
attributes:
|
||||||
|
last_reset: '1970-01-01T00:00:00+00:00'
|
||||||
|
|
||||||
|
# Internet Speed template sensor
|
||||||
|
- name: internet_speed_in
|
||||||
|
state: >
|
||||||
|
{{ (( states('sensor.wan_in_derivative') | float * 8 / 1000000 ) | round(2)) }}
|
||||||
|
unit_of_measurement: 'Mbps'
|
||||||
|
attributes:
|
||||||
|
last_reset: '1970-01-01T00:00:00+00:00'
|
||||||
|
- name: internet_speed_out
|
||||||
|
state: >
|
||||||
|
{{ (( states('sensor.wan_out_derivative') | float * 8 / 1000000 ) | round(2)) }}
|
||||||
|
unit_of_measurement: 'Mbps'
|
||||||
|
attributes:
|
||||||
last_reset: '1970-01-01T00:00:00+00:00'
|
last_reset: '1970-01-01T00:00:00+00:00'
|
||||||
|
@ -49,3 +49,13 @@
|
|||||||
source: sensor.energy_consumption_sum
|
source: sensor.energy_consumption_sum
|
||||||
name: Energy Consumption Monthly
|
name: Energy Consumption Monthly
|
||||||
cycle: monthly
|
cycle: monthly
|
||||||
|
|
||||||
|
# Energy (Solar)
|
||||||
|
energy_solar_daily:
|
||||||
|
source: sensor.balkonkraftwerk_energy
|
||||||
|
name: Energy Solar Daily
|
||||||
|
cycle: daily
|
||||||
|
energy_solar_monthly:
|
||||||
|
source: sensor.balkonkraftwerk_energy
|
||||||
|
name: Energy Solar Monthly
|
||||||
|
cycle: monthly
|
||||||
|
Loading…
Reference in New Issue
Block a user