52b0376aca
- Updated .ha_run.lock to reflect the new Home Assistant version 2026.4.2. - Enhanced automations.yaml with improved entity targeting and additional automation actions for window shading. - Refactored configuration.yaml to include templates from a separate file for better organization. - Added new ESPHome configurations for window sensors and updated KNX configurations for door contacts and buttons. - Removed deprecated pv_to_dhw.yaml package to streamline the project.
36 lines
1.3 KiB
YAML
36 lines
1.3 KiB
YAML
- trigger:
|
|
- trigger: event
|
|
event_type: bubble_card_update_modules
|
|
sensor:
|
|
- name: "Bubble Card Modules"
|
|
state: "saved"
|
|
icon: "mdi:puzzle"
|
|
attributes:
|
|
modules: "{{ trigger.event.data.modules }}"
|
|
last_updated: "{{ trigger.event.data.last_updated }}"
|
|
|
|
- sensor:
|
|
- name: "Interpolated Brightness from Azimuth"
|
|
unit_of_measurement: "lx"
|
|
state: >
|
|
{% set azimut = state_attr('sun.sun', 'azimuth') | float %}
|
|
|
|
{% set brightness_south = states('sensor.se_au_gt_lux_south') | float(0) %}
|
|
{% set brightness_west = states('sensor.se_au_gt_lux_west') | float(0) %}
|
|
{% set brightness_east = states('sensor.se_au_gt_lux_east') | float(0) %}
|
|
|
|
{% if azimut >= 90 and azimut < 180 %}
|
|
{# Ost → Süd: Interpolation #}
|
|
{% set t = (azimut - 90) / 90 %}
|
|
{{ (brightness_east * (1 - t) + brightness_south * t) | round(0) }}
|
|
|
|
{% elif azimut >= 180 and azimut < 270 %}
|
|
{# Süd → West: Interpolation #}
|
|
{% set t = (azimut - 180) / 90 %}
|
|
{{ (brightness_south * (1 - t) + brightness_west * t) | round(0) }}
|
|
|
|
{% else %}
|
|
{# Nachts / Nord: 0 #}
|
|
0
|
|
{% endif %}
|