diff --git a/.cursor/mcp.json b/.cursor/mcp.json index b3e3460..7001130 100644 --- a/.cursor/mcp.json +++ b/.cursor/mcp.json @@ -1,11 +1,3 @@ { - "mcpServers": { - "postgres": { - "command": "npx", - "args": ["-y", "@modelcontextprotocol/server-postgres"], - "env": { - "POSTGRES_CONNECTION_STRING": "postgresql://hass:FTXZ9r8iw0fTT655Q6tePTzp@synology.cobe.space:5433/hass" - } - } - } -} \ No newline at end of file + "mcpServers": {} +} \ No newline at end of file diff --git a/.ha_run.lock b/.ha_run.lock index 951cb5d..2507afd 100644 --- a/.ha_run.lock +++ b/.ha_run.lock @@ -1 +1 @@ -{"pid": 67, "version": 1, "ha_version": "2026.3.1", "start_ts": 1772977331.1190224} \ No newline at end of file +{"pid": 67, "version": 1, "ha_version": "2026.4.2", "start_ts": 1776243874.2238262} \ No newline at end of file diff --git a/automations.yaml b/automations.yaml index cdcac8d..c507a31 100644 --- a/automations.yaml +++ b/automations.yaml @@ -178,7 +178,9 @@ data: stop_actions: true target: - entity_id: automation.automatik_fur_einzelne_rolladen_blockieren + entity_id: + - automation.automatik_fur_einzelne_rolladen_blockieren + label_id: beschattung - action: cover.close_cover metadata: {} data: {} @@ -249,7 +251,16 @@ - badezimmer - gallerie - badezimmer_og2 - - millie + - action: automation.turn_on + metadata: {} + data: {} + target: + entity_id: + - automation.beschattung_r_eg_wc_01 + - automation.beschattung_r_eg_wz_01 + - automation.beschattung_r_eg_wz_02 + - automation.beschattung_r_og1_bi_01 + - automation.beschattung_r_og1_bz_01 - if: - condition: trigger id: @@ -262,6 +273,14 @@ area_id: - emil - schlafzimmer + - millie + - action: automation.turn_on + metadata: {} + data: {} + target: + entity_id: + - automation.beschattung_r_og1_sz1_01 + - automation.beschattung_r_og1_sz2_2 - delay: hours: 0 minutes: 0 @@ -720,205 +739,6 @@ target: entity_id: light.lda_au_ga_01 mode: restart -- id: '1743952518641' - alias: Beschattung Westen - description: '' - triggers: - - trigger: time_pattern - minutes: /15 - - trigger: numeric_state - entity_id: - - sensor.sun_solar_azimuth - id: ShadeOff - above: input_number.beschattung_azimut_west_ende - - trigger: numeric_state - entity_id: - - sensor.sun_solar_elevation - id: ShadeOff - below: input_number.beschattung_elevation - - trigger: state - entity_id: - - weather.forecast_home - to: - - Regnerisch - - Bewölkt - - Nebel - - Strömender Regen - - Hagel - - Gewitter, regnerisch - - Gewitter - - Schneeregen - - Schneefall - - Windig - - Windig, bewölkt - id: ShadeOff - - trigger: state - entity_id: - - weather.forecast_home - conditions: - - condition: or - conditions: - - condition: and - conditions: - - condition: numeric_state - entity_id: sensor.sun_solar_azimuth - above: input_number.beschattung_azimut_west_start - below: input_number.beschattung_azimut_west_ende - - condition: numeric_state - entity_id: sensor.sun_solar_elevation - above: input_number.beschattung_elevation - - condition: or - conditions: - - condition: state - entity_id: weather.forecast_home - state: partlycloudy - - condition: state - entity_id: weather.forecast_home - state: sunny - - condition: trigger - id: - - ShadeOff - - condition: state - entity_id: input_boolean.rolladenautomatik - state: 'on' - - condition: state - entity_id: input_boolean.rolladen_automatisch_beschatten - state: 'on' - - condition: state - entity_id: input_boolean.schlaffmodus - state: 'off' - - condition: state - entity_id: input_boolean.einschlaffmodus - state: 'off' - actions: - - action: automation.turn_off - metadata: {} - data: - stop_actions: true - target: - entity_id: automation.automatik_fur_einzelne_rolladen_blockieren - - if: - - condition: trigger - id: - - ShadeOff - then: - - if: - - condition: state - entity_id: input_boolean.block_r_eg_wz_01 - state: 'off' - then: - - action: cover.open_cover - metadata: {} - data: {} - target: - entity_id: cover.r_eg_wz_01 - else: - - if: - - condition: state - entity_id: input_boolean.block_r_eg_wz_01 - state: 'off' - then: - - action: cover.set_cover_position - metadata: {} - data: - position: 20 - target: - entity_id: cover.r_eg_wz_01 - - if: - - condition: trigger - id: - - ShadeOff - then: - - if: - - condition: state - entity_id: input_boolean.block_r_eg_wz_02 - state: 'off' - then: - - action: cover.open_cover - metadata: {} - data: {} - target: - entity_id: cover.r_eg_wz_02 - else: - - if: - - condition: state - entity_id: input_boolean.block_r_eg_wz_02 - state: 'off' - then: - - action: cover.set_cover_position - metadata: {} - data: - position: 20 - target: - entity_id: - - cover.r_eg_wz_02 - - if: - - condition: trigger - id: - - ShadeOff - then: - - if: - - condition: state - entity_id: input_boolean.block_r_og1_bi_01 - state: 'off' - then: - - action: cover.open_cover - metadata: {} - data: {} - target: - entity_id: - - cover.r_og1_bi_01 - else: - - if: - - condition: state - entity_id: input_boolean.block_r_og1_bi_01 - state: 'off' - then: - - action: cover.set_cover_position - metadata: {} - data: - position: 20 - target: - entity_id: cover.r_og1_bi_01 - - if: - - condition: trigger - id: - - ShadeOff - then: - - if: - - condition: state - entity_id: input_boolean.block_r_og1_sz1_01 - state: 'off' - then: - - action: cover.open_cover - metadata: {} - data: {} - target: - entity_id: cover.r_og1_sz1_01 - else: - - if: - - condition: state - entity_id: input_boolean.block_r_og1_sz1_01 - state: 'off' - then: - - action: cover.set_cover_position - metadata: {} - data: - position: 10 - target: - entity_id: - - cover.r_og1_sz1_01 - - delay: - hours: 0 - minutes: 0 - seconds: 45 - milliseconds: 0 - - action: automation.turn_on - metadata: {} - data: {} - target: - entity_id: automation.automatik_fur_einzelne_rolladen_blockieren - mode: single - id: '1743957027473' alias: Automatik für einzelne Rolladen blockieren description: '' @@ -930,30 +750,37 @@ entity_id: - cover.r_eg_wz_01 id: R_EG_WZ_01 + to: - trigger: state entity_id: - cover.r_eg_wz_02 id: R_EG_WZ_02 + to: - trigger: state entity_id: - cover.r_og1_bi_01 id: R_OG1_BI_01 + to: - trigger: state entity_id: - cover.r_og1_sz1_01 id: R_OG1_SZ1_01 + to: - trigger: state entity_id: - cover.r_og1_sz2_02 id: R_OG1_SZ2_02 + to: - trigger: state entity_id: - cover.r_og1_bz_01 id: R_OG1_BZ_01 + to: - trigger: state entity_id: - cover.r_eg_wc_01 id: R_EG_WC_01 + from: conditions: [] actions: - if: @@ -1285,175 +1112,6 @@ - climate.rtr_og1_2_fl - climate.rtr_ug_fl mode: single -- id: '1746266445297' - alias: Beschattung Ost - description: '' - triggers: - - trigger: time_pattern - minutes: /15 - - trigger: numeric_state - entity_id: - - sensor.sun_solar_azimuth - above: input_number.beschattung_azimut_ost_start - - trigger: numeric_state - entity_id: - - sensor.sun_solar_azimuth - above: input_number.beschattung_azimut_ost_ende - id: ShadeOff - - trigger: numeric_state - entity_id: - - sensor.sun_solar_elevation - above: input_number.beschattung_elevation - - trigger: state - entity_id: - - weather.forecast_home - to: - - Regnerisch - - Bewölkt - - Nebel - - Strömender Regen - - Hagel - - Gewitter, regnerisch - - Gewitter - - Schneeregen - - Schneefall - - Windig - - Windig, bewölkt - id: ShadeOff - - trigger: state - entity_id: - - weather.forecast_home - conditions: - - condition: or - conditions: - - condition: and - conditions: - - condition: numeric_state - entity_id: sensor.sun_solar_azimuth - above: input_number.beschattung_azimut_ost_start - below: input_number.beschattung_azimut_ost_ende - - condition: numeric_state - entity_id: sensor.sun_solar_elevation - above: input_number.beschattung_elevation - - condition: or - conditions: - - condition: state - entity_id: weather.forecast_home - state: partlycloudy - - condition: state - entity_id: weather.forecast_home - state: sunny - - condition: trigger - id: - - ShadeOff - - condition: state - entity_id: input_boolean.rolladenautomatik - state: 'on' - - condition: state - entity_id: input_boolean.rolladen_automatisch_beschatten - state: 'on' - actions: - - action: automation.turn_off - metadata: {} - data: - stop_actions: true - target: - entity_id: automation.automatik_fur_einzelne_rolladen_blockieren - - if: - - condition: trigger - id: - - ShadeOff - then: - - if: - - condition: state - entity_id: input_boolean.block_r_eg_wc_01 - state: 'off' - then: - - action: cover.open_cover - metadata: {} - data: {} - target: - entity_id: cover.r_eg_wc_01 - else: - - if: - - condition: state - entity_id: input_boolean.block_r_eg_wc_01 - state: 'off' - then: - - action: cover.set_cover_position - metadata: {} - data: - position: 50 - target: - entity_id: cover.r_eg_wc_01 - - if: - - condition: trigger - id: - - ShadeOff - then: - - if: - - condition: state - entity_id: input_boolean.block_r_og1_sz2_02 - state: 'off' - then: - - action: cover.open_cover - metadata: {} - data: {} - target: - entity_id: - - cover.r_og1_sz2_02 - else: - - if: - - condition: state - entity_id: input_boolean.block_r_og1_sz2_02 - state: 'off' - then: - - action: cover.set_cover_position - metadata: {} - data: - position: 20 - target: - entity_id: cover.r_og1_sz2_02 - - if: - - condition: trigger - id: - - ShadeOff - then: - - if: - - condition: state - entity_id: input_boolean.block_r_og1_bz_01 - state: 'off' - then: - - action: cover.open_cover - metadata: {} - data: {} - target: - entity_id: - - cover.r_og1_bz_01 - else: - - if: - - condition: state - entity_id: input_boolean.block_r_og1_bz_01 - state: 'off' - then: - - action: cover.set_cover_position - metadata: {} - data: - position: 20 - target: - entity_id: - - cover.r_og1_bz_01 - - delay: - hours: 0 - minutes: 0 - seconds: 45 - milliseconds: 0 - - action: automation.turn_on - metadata: {} - data: {} - target: - entity_id: automation.automatik_fur_einzelne_rolladen_blockieren - mode: single - id: '1747216933289' alias: Alarmanlag uschalten description: '' @@ -1756,53 +1414,6 @@ data: message: Obgepasst !! Du bas net méi alleng !! ;) mode: single -- id: '1757940601547' - alias: DND Papa - description: '' - triggers: - - trigger: state - entity_id: - - input_boolean.dnd_papa - to: 'on' - conditions: [] - actions: - - action: cover.set_cover_position - metadata: {} - data: - position: 19 - target: - entity_id: - - cover.r_og2_bz_01 - - cover.r_og2_sz_01 - - action: light.turn_on - metadata: {} - data: - brightness_pct: 5 - target: - entity_id: light.lda_og2_bz_01 - - wait_for_trigger: - - trigger: state - entity_id: - - input_boolean.dnd_papa - to: 'off' - timeout: - hours: 0 - minutes: 10 - seconds: 0 - milliseconds: 0 - - action: cover.open_cover - metadata: {} - data: {} - target: - entity_id: - - cover.r_og2_sz_01 - - cover.r_og2_bz_01 - - action: light.turn_off - metadata: {} - data: {} - target: - entity_id: light.lda_og2_bz_01 - mode: single - id: '1761133798548' alias: Benachrichtigung für nicht verfügbare Geräte description: '' @@ -2367,280 +1978,293 @@ data: code: '8211' mode: single -- id: '1772263405773' - alias: Pipi-Alarm +- id: '1773348704841' + alias: Alarm abends automatisch einschalten description: '' triggers: - trigger: time_pattern - minutes: '15' - conditions: [] + hours: '23' + conditions: + - condition: and + conditions: + - condition: zone + entity_id: person.ben_melchior + zone: zone.home + - condition: zone + entity_id: person.conny_eller + zone: zone.home actions: - - action: tts.speak + - action: input_select.select_option metadata: {} target: - entity_id: tts.google_translate_en_com + entity_id: input_select.alarmpanel data: - cache: true - media_player_entity_id: media_player.kuche - message: Pipi-Alarm!! Pipi-Alarm!! Emil muss du ob den Potti goen? + option: Dohem mode: single -- id: '1772562884642' - alias: Alarm automatisch ein- & ausschalten +- id: '1773479932299' + alias: 3D Drucker Notifications description: '' triggers: - - trigger: time - at: '23:00:00' - weekday: - - mon - - tue - - wed - - thu - - fri - - sat - - sun - id: arm + - device_id: b8bcddf18a3a846d5004e418d761673a + domain: bambu_lab + type: event_print_finished + trigger: device + id: printDone + - device_id: b8bcddf18a3a846d5004e418d761673a + domain: bambu_lab + type: event_print_error + trigger: device + id: printFailure + - trigger: state + entity_id: + - sensor.x1c_druckfortschritt + to: + - '10' + id: print10% + - trigger: state + entity_id: + - sensor.x1c_druckfortschritt + to: + - '25' + id: print25% + - trigger: state + entity_id: + - sensor.x1c_druckfortschritt + to: + - '50' + id: print50% + - trigger: state + entity_id: + - sensor.x1c_druckfortschritt + to: + - '75' + id: print75% conditions: [] actions: - if: - condition: trigger id: - - arm + - printDone then: - - action: select.select_option + - action: camera.snapshot metadata: {} - data: {} + target: + entity_id: camera.x1c_kamera + data: + filename: /config/www/snapshot/3dprint-status.jpg + - action: script.cobe_haus_benachrichtigung_mit_bild + metadata: {} + data: + title: COBE Haus + image: https://hass.cobe.space/local/snapshot/3dprint-status.jpg + message: 3DDrock ass ferdech! + - if: + - condition: trigger + id: + - printFailure + then: + - action: script.cobe_haus_benachrichtigung + metadata: {} + data: + title: COBE Haus + message: 3dDrock huet ee Problem! + - if: + - condition: trigger + id: + - print10% + - print50% + - print25% + - print75% + then: + - action: camera.snapshot + metadata: {} + target: + entity_id: camera.x1c_kamera + data: + filename: /config/www/snapshot/3dprint-status.jpg + - action: script.cobe_haus_benachrichtigung_mit_bild + metadata: {} + data: + title: COBE Haus + image: https://hass.cobe.space/local/snapshot/3dprint-status.jpg + message: 3DDrock ass bei 10%! + enabled: false mode: single -- id: '1772562886056' - alias: Alarm automatisch ein- & ausschalten +- id: '1773928061742' + alias: Garagentor mittels RFID éffnen description: '' triggers: - - trigger: time - at: '23:00:00' - weekday: - - mon - - tue - - wed - - thu - - fri - - sat - - sun - id: arm + - trigger: state + entity_id: + - binary_sensor.rfid_leser + to: + - 'on' + conditions: [] + actions: + - action: button.press + metadata: {} + target: + entity_id: button.garagentor_2 + data: {} + mode: single +- id: '1775226342150' + alias: Beleuchtung Makerpsace + description: '' + triggers: + - trigger: state + entity_id: + - sensor.sensyonehackerspace_any_presence + to: + - Detected + conditions: [] + actions: + - action: light.turn_on + metadata: {} + target: + entity_id: light.l_ug_ms_01 + data: {} + - wait_for_trigger: + - trigger: state + entity_id: + - sensor.sensyonehackerspace_any_presence + to: + - Clear + - delay: + hours: 0 + minutes: 0 + seconds: 5 + milliseconds: 0 + - action: light.turn_off + metadata: {} + target: + entity_id: light.l_ug_ms_01 + data: {} + mode: single +- id: '1775913848680' + alias: Beschattung R_EG_WZ_01 + description: '' + use_blueprint: + path: kn0x/smart_shading.yaml + input: + cover: cover.r_eg_wz_01 + brightness_sensor: sensor.interpolated_brightness_from_azimuth + azimuth_min_entity: input_number.beschattung_azimut_west_start + azimuth_max_entity: input_number.beschattung_azimut_west_ende + master_enable: input_boolean.rolladen_automatisch_beschatten + cover_block: input_boolean.block_r_eg_wz_01 + block_automation: automation.automatik_fur_einzelne_rolladen_blockieren + brightness_unshade_below: 20000 + brightness_shade_above: 25000 +- id: '1776155212442' + alias: Beschattung R_OG1_SZ2_2 + description: '' + use_blueprint: + path: kn0x/smart_shading.yaml + input: + cover: cover.r_og1_sz2_02 + brightness_sensor: sensor.interpolated_brightness_from_azimuth + azimuth_min_entity: input_number.beschattung_azimut_ost_start + azimuth_max_entity: input_number.beschattung_azimut_ost_ende + master_enable: input_boolean.rolladen_automatisch_beschatten + cover_block: input_boolean.block_r_og1_sz2_02 + block_automation: automation.automatik_fur_einzelne_rolladen_blockieren +- id: '1776159102357' + alias: Beschattung R_EG_WC_01 + description: '' + use_blueprint: + path: kn0x/smart_shading.yaml + input: + cover: cover.r_eg_wc_01 + brightness_sensor: sensor.interpolated_brightness_from_azimuth + azimuth_min_entity: input_number.beschattung_azimut_ost_start + azimuth_max_entity: input_number.beschattung_azimut_ost_ende + master_enable: input_boolean.rolladen_automatisch_beschatten + cover_block: input_boolean.block_r_eg_wc_01 + block_automation: automation.automatik_fur_einzelne_rolladen_blockieren + brightness_shade_above: 30000 + brightness_unshade_below: 25000 +- id: '1776159190428' + alias: Beschattung R_OG1_BZ_01 + description: '' + use_blueprint: + path: kn0x/smart_shading.yaml + input: + cover: cover.r_og1_bz_01 + brightness_sensor: sensor.interpolated_brightness_from_azimuth + azimuth_min_entity: input_number.beschattung_azimut_ost_start + azimuth_max_entity: input_number.beschattung_azimut_ost_ende + master_enable: input_boolean.rolladen_automatisch_beschatten + cover_block: input_boolean.block_r_og1_bz_01 + block_automation: automation.automatik_fur_einzelne_rolladen_blockieren +- id: '1776159384583' + alias: Beschattung R_EG_WZ_02 + description: '' + use_blueprint: + path: kn0x/smart_shading.yaml + input: + cover: cover.r_eg_wz_02 + brightness_sensor: sensor.interpolated_brightness_from_azimuth + azimuth_min_entity: input_number.beschattung_azimut_west_start + azimuth_max_entity: input_number.beschattung_azimut_west_ende + master_enable: input_boolean.rolladen_automatisch_beschatten + cover_block: input_boolean.block_r_eg_wz_02 + block_automation: automation.automatik_fur_einzelne_rolladen_blockieren +- id: '1776159435027' + alias: Beschattung R_OG1_BI_01 + description: '' + use_blueprint: + path: kn0x/smart_shading.yaml + input: + cover: cover.r_og1_bi_01 + brightness_sensor: sensor.interpolated_brightness_from_azimuth + azimuth_min_entity: input_number.beschattung_azimut_west_start + azimuth_max_entity: input_number.beschattung_azimut_west_ende + master_enable: input_boolean.rolladen_automatisch_beschatten + cover_block: input_boolean.block_r_og1_bi_01 + block_automation: automation.automatik_fur_einzelne_rolladen_blockieren +- id: '1776159528808' + alias: Beschattung R_OG1_SZ1_01 + description: '' + use_blueprint: + path: kn0x/smart_shading.yaml + input: + cover: cover.r_og1_sz1_01 + brightness_sensor: sensor.interpolated_brightness_from_azimuth + azimuth_min_entity: input_number.beschattung_azimut_west_start + azimuth_max_entity: input_number.beschattung_azimut_west_ende + master_enable: input_boolean.rolladen_automatisch_beschatten + cover_block: input_boolean.block_r_og1_sz1_01 + block_automation: automation.automatik_fur_einzelne_rolladen_blockieren +- id: '1776245990502' + alias: Bridge Risco - KNX Doorcontact + description: '' + triggers: + - trigger: state + entity_id: + - binary_sensor.fe_eg_wz_02 + id: FE_EG_WZ_02 conditions: [] actions: - if: - condition: trigger id: - - arm + - FE_EG_WZ_02 then: - - action: select.select_option - metadata: {} - data: {} - mode: single -- id: '1772562886824' - alias: Alarm automatisch ein- & ausschalten - description: '' - triggers: - - trigger: time - at: '23:00:00' - weekday: - - mon - - tue - - wed - - thu - - fri - - sat - - sun - id: arm - conditions: [] - actions: - - if: - - condition: trigger - id: - - arm - then: - - action: select.select_option - metadata: {} - data: {} - mode: single -- id: '1772562887540' - alias: Alarm automatisch ein- & ausschalten - description: '' - triggers: - - trigger: time - at: '23:00:00' - weekday: - - mon - - tue - - wed - - thu - - fri - - sat - - sun - id: arm - conditions: [] - actions: - - if: - - condition: trigger - id: - - arm - then: - - action: select.select_option - metadata: {} - data: {} - mode: single -- id: '1772562887690' - alias: Alarm automatisch ein- & ausschalten - description: '' - triggers: - - trigger: time - at: '23:00:00' - weekday: - - mon - - tue - - wed - - thu - - fri - - sat - - sun - id: arm - conditions: [] - actions: - - if: - - condition: trigger - id: - - arm - then: - - action: select.select_option - metadata: {} - data: {} - mode: single -- id: '1772562887873' - alias: Alarm automatisch ein- & ausschalten - description: '' - triggers: - - trigger: time - at: '23:00:00' - weekday: - - mon - - tue - - wed - - thu - - fri - - sat - - sun - id: arm - conditions: [] - actions: - - if: - - condition: trigger - id: - - arm - then: - - action: select.select_option - metadata: {} - data: {} - mode: single -- id: '1772562888357' - alias: Alarm automatisch ein- & ausschalten - description: '' - triggers: - - trigger: time - at: '23:00:00' - weekday: - - mon - - tue - - wed - - thu - - fri - - sat - - sun - id: arm - conditions: [] - actions: - - if: - - condition: trigger - id: - - arm - then: - - action: select.select_option - metadata: {} - data: {} - mode: single -- id: '1772562890941' - alias: Alarm automatisch ein- & ausschalten - description: '' - triggers: - - trigger: time - at: '23:00:00' - weekday: - - mon - - tue - - wed - - thu - - fri - - sat - - sun - id: arm - conditions: [] - actions: - - if: - - condition: trigger - id: - - arm - then: - - action: select.select_option - metadata: {} - data: {} - mode: single -- id: '1772562891823' - alias: Alarm automatisch ein- & ausschalten - description: '' - triggers: - - trigger: time - at: '23:00:00' - weekday: - - mon - - tue - - wed - - thu - - fri - - sat - - sun - id: arm - conditions: [] - actions: - - if: - - condition: trigger - id: - - arm - then: - - action: select.select_option - metadata: {} - data: {} - mode: single -- id: '1772562892007' - alias: Alarm automatisch ein- & ausschalten - description: '' - triggers: - - trigger: time - at: '23:00:00' - weekday: - - mon - - tue - - wed - - thu - - fri - - sat - - sun - id: arm - conditions: [] - actions: - - if: - - condition: trigger - id: - - arm - then: - - action: select.select_option - metadata: {} - data: {} + - if: + - condition: state + entity_id: binary_sensor.fe_eg_wz_02 + state: + - 'on' + then: + - action: switch.turn_on + metadata: {} + target: + entity_id: switch.se_eg_wz_02_door_contact + data: {} + else: + - action: switch.turn_off + metadata: {} + target: + entity_id: switch.se_eg_wz_02_door_contact + data: {} mode: single diff --git a/configuration.yaml b/configuration.yaml index 8be112b..c5aae50 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -34,16 +34,4 @@ automation: !include automations.yaml script: !include scripts.yaml scene: !include scenes.yaml knx: !include knx/knx.yaml - -# Storage for Bubble Card Modules -template: - - 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 }}" \ No newline at end of file +template: !include templates.yaml \ No newline at end of file diff --git a/esphome/.gitignore b/esphome/.gitignore new file mode 100644 index 0000000..d8b4157 --- /dev/null +++ b/esphome/.gitignore @@ -0,0 +1,5 @@ +# Gitignore settings for ESPHome +# This is an example and may include too much for your use-case. +# You can modify this file to suit your needs. +/.esphome/ +/secrets.yaml diff --git a/esphome/archive/reedsensor.yaml b/esphome/archive/reedsensor.yaml new file mode 100644 index 0000000..d4c8ecc --- /dev/null +++ b/esphome/archive/reedsensor.yaml @@ -0,0 +1,50 @@ +esphome: + name: fenstersensor + friendly_name: Fenstersensor + +esp8266: + board: d1_mini + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + fast_connect: true + min_auth_mode: WPA2 + +api: + encryption: + key: !secret api_key + +ota: + - platform: esphome + password: !secret ota_password + +logger: + +deep_sleep: + id: deep_sleep_control + run_duration: 15s + sleep_duration: 60min + +binary_sensor: + - platform: gpio + pin: + number: D1 + mode: INPUT_PULLUP + inverted: true + name: "Fenster 1" + device_class: window + filters: + - delayed_on: 50ms + - delayed_off: 50ms + + - platform: gpio + pin: + number: D2 + mode: INPUT_PULLUP + inverted: true + name: "Fenster 2" + device_class: window + filters: + - delayed_on: 50ms + - delayed_off: 50ms \ No newline at end of file diff --git a/esphome/reedsensor.yaml b/esphome/reedsensor.yaml new file mode 100644 index 0000000..e45fdbf --- /dev/null +++ b/esphome/reedsensor.yaml @@ -0,0 +1,61 @@ +esphome: + name: fenstersensor + friendly_name: Fenstersensor + +esp32: + board: esp32dev + variant: esp32 + framework: + type: arduino + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + fast_connect: true + min_auth_mode: WPA2 + +api: + encryption: + key: !secret api_key + +ota: + - platform: esphome + password: !secret ota_password + +logger: + +deep_sleep: + id: deep_sleep_control + run_duration: 8s + esp32_ext1_wakeup: + pins: + - number: GPIO4 + allow_other_uses: true + - number: GPIO13 + allow_other_uses: true + mode: ANY_HIGH + +binary_sensor: + - platform: gpio + pin: + number: GPIO4 + mode: INPUT_PULLUP + inverted: true + allow_other_uses: true + name: "Fenster 1" + device_class: window + filters: + - delayed_on: 50ms + - delayed_off: 50ms + + - platform: gpio + pin: + number: GPIO13 + mode: INPUT_PULLUP + inverted: true + allow_other_uses: true + name: "Fenster 2" + device_class: window + filters: + - delayed_on: 50ms + - delayed_off: 50ms \ No newline at end of file diff --git a/beschattung_skript.yaml b/knx/binary_sensor.yaml similarity index 100% rename from beschattung_skript.yaml rename to knx/binary_sensor.yaml diff --git a/knx/button.yaml b/knx/button.yaml index db926cb..17f01a2 100644 --- a/knx/button.yaml +++ b/knx/button.yaml @@ -1,5 +1,8 @@ -- name: 'Garagentor 1' +- name: 'Garagentor Conny öffnen' address: '5/4/0' -- name: 'Garagentor 2' +- name: 'Garagentor Ben öffnen' address: '5/4/1' + +- name: 'Haustür öffnen' + address: '0/0/2' \ No newline at end of file diff --git a/knx/climate.yaml b/knx/climate.yaml index 622d27a..e45fa67 100644 --- a/knx/climate.yaml +++ b/knx/climate.yaml @@ -64,4 +64,4 @@ target_temperature_state_address: "4/3/10" operation_mode_address: "4/3/16" operation_mode_state_address: "4/3/16" - active_state_address: "4/3/18" \ No newline at end of file + active_state_address: "4/3/18" diff --git a/knx/cover.yaml b/knx/cover.yaml index c33beb5..7064084 100644 --- a/knx/cover.yaml +++ b/knx/cover.yaml @@ -97,4 +97,4 @@ move_short_address: "4/2/11" stop_address: "4/2/11" position_address: "4/2/13" - position_state_address: "4/2/12" \ No newline at end of file + position_state_address: "4/2/12" diff --git a/knx/light.yaml b/knx/light.yaml index 0a95071..1f7ccef 100644 --- a/knx/light.yaml +++ b/knx/light.yaml @@ -226,4 +226,3 @@ brightness_state_address: "2/1/14" - diff --git a/knx/switch.yaml b/knx/switch.yaml index 7eded91..2521a55 100644 --- a/knx/switch.yaml +++ b/knx/switch.yaml @@ -13,3 +13,22 @@ - name: 'SS_OG1_FL_Tablet' address: '3/4/2' state_address: '3/4/3' + +- name: 'SE_EG_WZ_01 Door Contact' + address: '2/5/4' + state_address: '2/5/4' + + +- name: 'SE_EG_WZ_02 Door Contact' + address: '2/5/6' + state_address: '2/5/6' + + +- name: 'SE_EG_WZ_03 Door Contact' + address: '2/5/7' + state_address: '2/5/7' + + +- name: 'SE_EG_WC_01 Door Contact' + address: '2/5/8' + state_address: '2/5/8' diff --git a/packages/pv_to_dhw.yaml b/packages/pv_to_dhw.yaml deleted file mode 100644 index afebf10..0000000 --- a/packages/pv_to_dhw.yaml +++ /dev/null @@ -1,135 +0,0 @@ -# ems-esp - - # Aktuelle Warmwassertemperatur: sensor.boiler_dhw_current_intern_temperature - # Soll Warmwassertemperatur: sensor.boiler_dhw_set_temperature - # Soll Warmwassertemperatur: (einstellen) number.boiler_dhw_comfort_switch_off - # DHW Heizen aktiv: binary_sensor.boiler_dhw_charging - -# sh15t - - # MPPT Total Power: sensor.sh15t_mppt_total_power - # Total Export Active Power: sensor.sh15t_total_export_active_power - - -template: - - sensor: - - name: "DHW Boost available" - state: > - {% set dhw_temp = states('sensor.boiler_dhw_current_intern_temperature') | float %} - {% set dhw_setpoint = states('sensor.boiler_dhw_set_temperature') | float %} - {% set temp_diff = dhw_setpoint - dhw_temp %} - {{ temp_diff > 5 }} - - - name: "DHW Boost Demand" - state: > - {% set excess = states('sensor.sh15t_total_export_active_power') | float(0) %} - {% set dhw_available = states('sensor.dhw_boost_available') %} - {% set wp_power = states('input_number.dhw_pv_min_excess') | float %} - {{ excess > wp_power and dhw_available }} - - - binary_sensor: - - name: "DHW PV Boost active" - state: > - {{ states('input_boolean.dhw_pv_boost_enabled') == 'on' and - states('sensor.dhw_boost_demand') }} - -input_boolean: - dhw_pv_boost_enabled: - name: "DHW PV Boost enabled" - icon: mdi:water-boiler-auto - initial: false - -input_number: - dhw_pv_boost_temp: - name: "DHW PV Boost Setpoint temperature" - min: 45 - max: 65 - step: 1 - unit_of_measurement: "°C" - initial: 60 - - dhw_pv_min_excess: - name: "Minimal PV Excess for DHW" - min: 1 - max: 5 - step: 0.1 - unit_of_measurement: "kW" - initial: 2 - -input_datetime: - dhw_pv_boost_start: - name: "PV-Boost Earliest Start Time" - has_time: true - initial: "10:00:00" - - dhw_pv_boost_end: - name: "PV-Boost Latest End Time" - has_time: true - initial: "17:00:00" - -# automation: -# - id: 'dhw_pv_boost_start' -# alias: "DHW PV-Boost Start" -# trigger: -# - platform: numeric_state -# entity_id: sensor.sh15t_total_export_active_power -# above: input_number.dhw_pv_min_excess -# for: -# minutes: 5 -# condition: -# - condition: state -# entity_id: input_boolean.dhw_pv_boost_enabled -# state: 'on' -# - condition: time -# after: input_datetime.dhw_pv_boost_start -# before: input_datetime.dhw_pv_boost_end -# - condition: numeric_state -# entity_id: sensor.boiler_dhw_current_intern_temperature -# below: input_number.dhw_pv_boost_temp -# - condition: state -# entity_id: binary_sensor.boiler_dhw_charging -# state: 'off' -# action: -# - service: number.set_value -# target: -# entity_id: number.boiler_dhw_set_temperature -# data: -# value: "{{ states('input_number.dhw_pv_boost_temp') }}" -# - service: switch.turn_on -# target: -# entity_id: switch.boiler_dhw_comfort -# - service: script.cobe_haus_benachrichtigung -# data: -# message: "DHW PV-Boost started - Excess: {{ states('sensor.sh15t_total_export_active_power') }}kW" -# title: "COBE Haus - DHW PV-Boost" - -# - id: 'dhw_pv_boost_stop' -# alias: "DHW PV-Boost Stop" -# trigger: -# - platform: numeric_state -# entity_id: sensor.sh15t_total_export_active_power -# below: 1.0 -# for: -# minutes: 10 -# - platform: numeric_state -# entity_id: sensor.boiler_dhw_current_intern_temperature -# above: input_number.dhw_pv_boost_temp -# - platform: time -# at: input_datetime.dhw_pv_boost_end -# condition: -# - condition: state -# entity_id: binary_sensor.dhw_pv_boost_aktiv -# state: 'on' -# action: -# - service: number.set_value -# target: -# entity_id: number.boiler_dhw_set_temperature -# data: -# value: 50 -# - service: switch.turn_off -# target: -# entity_id: switch.boiler_dhw_comfort -# - service: script.cobe_haus_benachrichtigung -# data: -# message: "DHW PV-Boost stopped - Temperature reached or excess too low" -# title: "COBE Haus - DHW PV-Boost" diff --git a/scripts.yaml b/scripts.yaml index c8728af..e05684e 100644 --- a/scripts.yaml +++ b/scripts.yaml @@ -62,95 +62,6 @@ cobe_haus_benachrichtigung_mit_bild: required: true alias: COBE Haus Benachrichtigung mit Bild description: '' -smarte_beschattung: - sequence: [] - fields: - cover_entity: - description: Entity ID des Rollladens - example: cover.wohnzimmer_rolladen - required: true - selector: - entity: - domain: cover - window_azimuth_start: - description: Start-Azimut des Fensters (Grad) - example: 135 - required: true - default: 90 - selector: - number: - min: 0 - max: 360 - step: 1 - unit_of_measurement: ° - window_azimuth_end: - description: End-Azimut des Fensters (Grad) - example: 225 - required: true - default: 270 - selector: - number: - min: 0 - max: 360 - step: 1 - unit_of_measurement: ° - min_elevation: - description: Minimale Sonnenhöhe für Beschattung - example: 15 - default: 10 - selector: - number: - min: 0 - max: 90 - step: 1 - unit_of_measurement: ° - max_elevation: - description: Maximale Sonnenhöhe für stärkste Beschattung - example: 60 - default: 50 - selector: - number: - min: 0 - max: 90 - step: 1 - unit_of_measurement: ° - max_closed_position: - description: Maximal geschlossene Position (0=ganz zu, 100=ganz auf) - example: 20 - default: 15 - selector: - number: - min: 0 - max: 100 - step: 1 - unit_of_measurement: '%' - fully_open_position: - description: Vollständig geöffnete Position - example: 100 - default: 100 - selector: - number: - min: 0 - max: 100 - step: 1 - unit_of_measurement: '%' - block_entity: - description: Block-Entity (wenn aktiviert, wird Rolladen nicht bewegt) - example: input_boolean.wohnzimmer_rolladen_block - required: false - selector: - entity: - domain: - - input_boolean - - binary_sensor - - switch - enable_logging: - description: Debug-Logging aktivieren - default: false - selector: - boolean: - alias: Smarte Beschattung - description: '' cobe_haus_kritische_benachrichtigung: sequence: - action: notify.mobile_app_kn0x_tech_iphone diff --git a/templates.yaml b/templates.yaml index e69de29..73f5b82 100644 --- a/templates.yaml +++ b/templates.yaml @@ -0,0 +1,35 @@ +- 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 %}