From e49ae9055f8518e43a23e318f21f29e3e55a8a62 Mon Sep 17 00:00:00 2001 From: oskar Date: Thu, 23 Jul 2026 13:06:08 +0200 Subject: [PATCH] feat(ha/ken): automatyka klimy w salonie (prog + suszenie parownika) --- .../config/ken/automations/1784804667795.yaml | 66 +++++++++++++++++++ .../config/ken/automations/1784804668795.yaml | 21 ++++++ .../ken/scripts/klima_salon_dry_off.yaml | 19 ++++++ 3 files changed, 106 insertions(+) create mode 100644 services/home-assistant/config/ken/automations/1784804667795.yaml create mode 100644 services/home-assistant/config/ken/automations/1784804668795.yaml create mode 100644 services/home-assistant/config/ken/scripts/klima_salon_dry_off.yaml diff --git a/services/home-assistant/config/ken/automations/1784804667795.yaml b/services/home-assistant/config/ken/automations/1784804667795.yaml new file mode 100644 index 0000000..4a6f059 --- /dev/null +++ b/services/home-assistant/config/ken/automations/1784804667795.yaml @@ -0,0 +1,66 @@ +actions: +- choose: + - conditions: + - condition: trigger + id: start + - condition: state + entity_id: input_boolean.klima_salon_auto + state: 'on' + - condition: state + entity_id: sun.sun + state: above_horizon + - condition: template + value_template: '{{ states(''sensor.thtuyabalkon_temperature'') | float(0) > states(''sensor.thsalon_temperature'') | float(0) }}' + - condition: state + entity_id: climate.gree_ir_blaster_klimatyzacja + state: 'off' + - condition: state + entity_id: script.klima_salon_dry_off + state: 'off' + sequence: + - action: climate.set_temperature + data: + hvac_mode: cool + temperature: '{{ states(''input_number.klima_salon_temp_docelowa'') | float }}' + target: + entity_id: climate.gree_ir_blaster_klimatyzacja + - conditions: + - condition: trigger + id: sync + - condition: state + entity_id: input_boolean.klima_salon_auto + state: 'on' + - condition: state + entity_id: climate.gree_ir_blaster_klimatyzacja + state: cool + sequence: + - action: climate.set_temperature + data: + temperature: '{{ states(''input_number.klima_salon_temp_docelowa'') | float }}' + target: + entity_id: climate.gree_ir_blaster_klimatyzacja + default: [] +alias: 'Klima salon: włącz chłodzenie i synchronizuj cel' +conditions: [] +description: 'Włącza chłodzenie klimatyzacji w salonie po przekroczeniu progu temperatury i aktualizuje zadaną temperaturę podczas pracy. managed-by: repo' +id: '1784804667795' +mode: single +triggers: +- id: start + trigger: template + value_template: '{{ states(''sensor.thsalon_temperature'') | float(0) > (states(''input_number.klima_salon_temp_docelowa'') | float(0) + states(''input_number.klima_salon_tolerancja'') | float(0)) }}' +- event: sunrise + id: start + offset: 0 + trigger: sun +- entity_id: input_boolean.klima_salon_auto + id: start + to: 'on' + trigger: state +- above: sensor.thsalon_temperature + entity_id: sensor.thtuyabalkon_temperature + id: start + trigger: numeric_state +- entity_id: input_number.klima_salon_temp_docelowa + id: sync + trigger: state diff --git a/services/home-assistant/config/ken/automations/1784804668795.yaml b/services/home-assistant/config/ken/automations/1784804668795.yaml new file mode 100644 index 0000000..a003dea --- /dev/null +++ b/services/home-assistant/config/ken/automations/1784804668795.yaml @@ -0,0 +1,21 @@ +actions: +- action: script.turn_on + target: + entity_id: script.klima_salon_dry_off +alias: 'Klima salon: wyłącz chłodzenie i osusz parownik' +conditions: +- condition: state + entity_id: climate.gree_ir_blaster_klimatyzacja + state: cool +description: 'Wyłącza tryb chłodzenia klimatyzacji w salonie i uruchamia suszenie parownika. managed-by: repo' +id: '1784804668795' +mode: single +triggers: +- event: sunset + offset: 0 + trigger: sun +- trigger: template + value_template: '{{ states(''sensor.thtuyabalkon_temperature'') | float(0) <= states(''sensor.thsalon_temperature'') | float(0) }}' +- entity_id: input_boolean.klima_salon_auto + to: 'off' + trigger: state diff --git a/services/home-assistant/config/ken/scripts/klima_salon_dry_off.yaml b/services/home-assistant/config/ken/scripts/klima_salon_dry_off.yaml new file mode 100644 index 0000000..07a7db3 --- /dev/null +++ b/services/home-assistant/config/ken/scripts/klima_salon_dry_off.yaml @@ -0,0 +1,19 @@ +alias: 'Klima salon: susz parownik i wyłącz' +description: 'Ustawia klimatyzację w salonie na wentylację na 5 minut w celu osuszenia parownika, po czym ją wyłącza. managed-by: repo' +mode: single +sequence: +- action: climate.set_hvac_mode + data: + hvac_mode: fan_only + target: + entity_id: climate.gree_ir_blaster_klimatyzacja +- delay: + hours: 0 + milliseconds: 0 + minutes: 5 + seconds: 0 +- action: climate.set_hvac_mode + data: + hvac_mode: 'off' + target: + entity_id: climate.gree_ir_blaster_klimatyzacja