2024-10-11 15:31:24 +02:00
|
|
|
# - select:
|
|
|
|
# - name: "Wohnzimmer Effekt"
|
|
|
|
# unique_id: '6641823075755'
|
|
|
|
# state: "{{ state_attr('light.wohnzimmer_hinten', 'effect') }}"
|
|
|
|
# icon: mdi:firework
|
|
|
|
# options: >
|
|
|
|
# {{ state_attr('light.wohnzimmer_hinten', 'effect_list') }}
|
|
|
|
# select_option:
|
|
|
|
# - service: light.turn_on
|
|
|
|
# target:
|
|
|
|
# entity_id: light.wohnzimmer_hinten, light.wohnzimmer_vorne
|
|
|
|
# data:
|
|
|
|
# effect: "{{ option }}"
|
2024-10-10 14:57:16 +02:00
|
|
|
- select:
|
|
|
|
- name: "Wohnzimmer Palette"
|
|
|
|
unique_id: '3107042775387'
|
|
|
|
state: "{{ states('select.wohnzimmer_hinten_color_palette') }}"
|
|
|
|
icon: mdi:palette
|
|
|
|
options: >
|
|
|
|
{{ state_attr('select.wohnzimmer_hinten_color_palette', 'options') }}
|
|
|
|
select_option:
|
|
|
|
- service: select.select_option
|
2023-12-14 18:41:43 +01:00
|
|
|
target:
|
2024-10-10 14:57:16 +02:00
|
|
|
entity_id: select.wohnzimmer_hinten_color_palette, select.wohnzimmer_vorne_color_palette
|
2023-12-14 18:41:43 +01:00
|
|
|
data:
|
2024-10-10 14:57:16 +02:00
|
|
|
option: '{{ option }}'
|
2023-12-14 18:41:43 +01:00
|
|
|
- select:
|
|
|
|
- name: "Available Media Players"
|
2024-10-08 12:59:18 +02:00
|
|
|
unique_id: '6284128947660'
|
2023-12-14 18:41:43 +01:00
|
|
|
state: "{{ states('input_text.selected_media_player') }}"
|
|
|
|
options: >
|
|
|
|
{{ states.media_player
|
|
|
|
| rejectattr('state', 'in', ['off', 'idle', 'unavailable', 'unknown'])
|
|
|
|
| map(attribute ='entity_id') | list }}
|
|
|
|
select_option:
|
|
|
|
- service: input_text.set_value
|
|
|
|
target:
|
|
|
|
entity_id: input_text.selected_media_player
|
|
|
|
data:
|
|
|
|
value: "{{ option }}"
|
2023-06-25 22:41:46 +02:00
|
|
|
- sensor:
|
|
|
|
- name: "power_other"
|
2024-10-08 12:59:18 +02:00
|
|
|
unique_id: '5579422933393'
|
2023-06-25 22:41:46 +02:00
|
|
|
unit_of_measurement: "W"
|
|
|
|
icon: mdi:flash
|
|
|
|
state: >
|
|
|
|
{% set total = states('sensor.netzleistung') | float %}
|
|
|
|
{% set solar = states('sensor.balkonkraftwerk_power') | float %}
|
|
|
|
{% set raumduft = states('sensor.flur_raumduft_power') | float %}
|
|
|
|
{% set keller = states('sensor.keller_power') | float %}
|
|
|
|
{% set anrichte = states('sensor.kuche_anrichte_power') | float %}
|
|
|
|
{% set musik = states('sensor.kuche_musik_power') | float %}
|
|
|
|
{% set bett = states('sensor.schlafzimmer_bett_power') | float %}
|
|
|
|
{% set heimkino_sz = states('sensor.schlafzimmer_heimkino_power') | float %}
|
|
|
|
{% set deko = states('sensor.schreibtisch_deko_power') | float %}
|
|
|
|
{% set schreibtisch = states('sensor.schreibtisch_power') | float %}
|
|
|
|
{% set serverraum = states('sensor.serverraum_power') | float %}
|
|
|
|
{% set heimkino_wz = states('sensor.wohnzimmer_heimkino_power') | float %}
|
|
|
|
{% set spieleschrank = states('sensor.wohnzimmer_spieleschrank_power') | float %}
|
2024-10-03 12:43:06 +02:00
|
|
|
{% set kuehlschrank = states('sensor.tz3000_ww6drja5_ts011f_leistung') | float %}
|
|
|
|
{% set kaffeemaschine = states('sensor.kaffeemaschine_leistung_2') | float %}
|
|
|
|
{% set waeschetrockner = states('sensor.waschetrockner_leistung') | float %}
|
|
|
|
{% set waschmaschine = states('sensor.waschmaschine_leistung') | float %}
|
|
|
|
{{ (total + solar - raumduft - keller - musik - bett - heimkino_sz - deko - schreibtisch - serverraum - heimkino_wz - spieleschrank - kuehlschrank - kaffeemaschine - waeschetrockner - waschmaschine) | round(1) }}
|
2023-06-25 22:41:46 +02:00
|
|
|
device_class: power
|
|
|
|
state_class: measurement
|
2023-07-01 19:36:31 +02:00
|
|
|
attributes:
|
2023-06-25 22:41:46 +02:00
|
|
|
last_reset: '1970-01-01T00:00:00+00:00'
|
|
|
|
|
|
|
|
# Shelly 3EM cumulative sensors (incl. PV)
|
|
|
|
- sensor:
|
|
|
|
# Template sensor for values of power import (active_power > 0)
|
|
|
|
- name: power_import
|
2024-10-08 12:59:18 +02:00
|
|
|
unique_id: '2385816278013'
|
2023-06-25 22:41:46 +02:00
|
|
|
unit_of_measurement: 'W'
|
|
|
|
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 %}
|
2023-06-25 23:41:02 +02:00
|
|
|
{{ (states('sensor.line_power_channel_a_power')|float + states('sensor.line_power_channel_b_power')|float + states('sensor.line_power_channel_c_power')|float)|round(1) }}
|
2023-06-25 22:41:46 +02:00
|
|
|
{% else %}
|
|
|
|
{{ 0 }}
|
|
|
|
{% endif %}
|
|
|
|
device_class: power
|
|
|
|
state_class: measurement
|
|
|
|
icon: mdi:transmission-tower-export
|
2023-07-01 19:36:31 +02:00
|
|
|
attributes:
|
2023-06-25 22:41:46 +02:00
|
|
|
last_reset: '1970-01-01T00:00:00+00:00'
|
2023-07-01 19:36:31 +02:00
|
|
|
|
2023-06-25 22:41:46 +02:00
|
|
|
# Template sensor for values of power export (active_power < 0)
|
|
|
|
- name: power_export
|
2024-10-08 12:59:18 +02:00
|
|
|
unique_id: '9143524256421'
|
2023-06-25 22:41:46 +02:00
|
|
|
unit_of_measurement: 'W'
|
|
|
|
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 %}
|
2023-06-25 23:41:02 +02:00
|
|
|
{{ ((states('sensor.line_power_channel_a_power')|float + states('sensor.line_power_channel_b_power')|float + states('sensor.line_power_channel_c_power')|float) * -1 ) | round(1) }}
|
2023-06-25 22:41:46 +02:00
|
|
|
{% else %}
|
|
|
|
{{ 0 }}
|
|
|
|
{% endif %}
|
|
|
|
device_class: power
|
|
|
|
state_class: measurement
|
|
|
|
icon: mdi:transmission-tower-import
|
2023-07-01 19:36:31 +02:00
|
|
|
attributes:
|
2023-06-25 22:41:46 +02:00
|
|
|
last_reset: '1970-01-01T00:00:00+00:00'
|
|
|
|
|
|
|
|
# Template sensor for values of power consumption
|
|
|
|
- name: power_consumption
|
2024-10-08 12:59:18 +02:00
|
|
|
unique_id: '3502047649408'
|
2023-06-25 22:41:46 +02:00
|
|
|
unit_of_measurement: 'W'
|
|
|
|
state: >
|
|
|
|
{% 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 %}
|
2023-07-01 19:36:31 +02:00
|
|
|
{{ ((states('sensor.balkonkraftwerk_power')|float(0)) - states('sensor.power_export')|float(0)) | round(1) }}
|
2023-06-25 22:41:46 +02:00
|
|
|
{% else %}
|
2023-06-25 23:41:02 +02:00
|
|
|
{{ (states('sensor.power_import')|float(0) + states('sensor.balkonkraftwerk_power')|float(0)) | round(1) }}
|
2023-06-25 22:41:46 +02:00
|
|
|
{% endif %}
|
|
|
|
device_class: power
|
|
|
|
state_class: measurement
|
|
|
|
icon: mdi:home-lightning-bolt
|
2023-07-01 19:36:31 +02:00
|
|
|
attributes:
|
|
|
|
last_reset: '1970-01-01T00:00:00+00:00'
|
|
|
|
|
|
|
|
# Internet Speed template sensor
|
|
|
|
- name: internet_speed_in
|
2024-10-08 12:59:18 +02:00
|
|
|
unique_id: '9519483670666'
|
2023-07-01 19:36:31 +02:00
|
|
|
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:
|
2023-06-25 22:41:46 +02:00
|
|
|
last_reset: '1970-01-01T00:00:00+00:00'
|