From b5a9b1eeddc71d90a120a0eb492c573c43444192 Mon Sep 17 00:00:00 2001 From: jabertwo <git@jabertwo.de> Date: Tue, 11 Jul 2023 23:08:36 +0200 Subject: [PATCH] Move nodered automations to ansible --- .../templates/config/esphome_plug04.yaml | 2 +- .../templates/config/esphome_plug08.yaml | 2 +- .../templates/config/esphome_popcorn.yaml | 2 +- .../templates/config/configuration.yaml | 136 +++++++++++++++++- 4 files changed, 136 insertions(+), 6 deletions(-) diff --git a/intern/docker_esphome/templates/config/esphome_plug04.yaml b/intern/docker_esphome/templates/config/esphome_plug04.yaml index 04ecaa88..59624284 100644 --- a/intern/docker_esphome/templates/config/esphome_plug04.yaml +++ b/intern/docker_esphome/templates/config/esphome_plug04.yaml @@ -3,7 +3,7 @@ {% include "/includes/ansible.inc.yaml" %} {% include "/includes/board.esp01_1m.inc.yaml" %} - comment: Halogen Lounge + comment: frei {% include "/includes/common.inc.yaml" %} on_message: diff --git a/intern/docker_esphome/templates/config/esphome_plug08.yaml b/intern/docker_esphome/templates/config/esphome_plug08.yaml index 5c118347..5537965c 100644 --- a/intern/docker_esphome/templates/config/esphome_plug08.yaml +++ b/intern/docker_esphome/templates/config/esphome_plug08.yaml @@ -3,7 +3,7 @@ {% include "/includes/ansible.inc.yaml" %} {% include "/includes/board.esp01_1m.inc.yaml" %} - comment: 3D Drucker Prusanet + comment: WLED Vorhang {% include "/includes/common.inc.yaml" %} on_message: diff --git a/intern/docker_esphome/templates/config/esphome_popcorn.yaml b/intern/docker_esphome/templates/config/esphome_popcorn.yaml index d8f3f4c8..d3b855f2 100644 --- a/intern/docker_esphome/templates/config/esphome_popcorn.yaml +++ b/intern/docker_esphome/templates/config/esphome_popcorn.yaml @@ -135,7 +135,7 @@ climate: id: pid_heater name: "PID Heater Controller" sensor: pot_sensor - default_target_temperature: 240 + default_target_temperature: 220 heat_output: pot_heater control_parameters: kp: 0.09549 diff --git a/intern/docker_homeassistant/templates/config/configuration.yaml b/intern/docker_homeassistant/templates/config/configuration.yaml index de600598..a64d8cf5 100644 --- a/intern/docker_homeassistant/templates/config/configuration.yaml +++ b/intern/docker_homeassistant/templates/config/configuration.yaml @@ -298,8 +298,7 @@ automation ansible: # turn off all radiators - alias: ANSIBLE_heizung_aus description: Schaltet alle Heizungen aus - trigger: - - type: [] + trigger: [] condition: [] action: - service: climate.turn_off @@ -684,4 +683,135 @@ automation ansible: - select.lampan_preset - select.clock_preset mode: single - + + # WLED Zonenstatus + - alias: "ANSIBLE_WLED_Zonenstatus" + description: "Turn WLED devices on, when opened, off when closed" + mode: single + trigger: + - platform: state + entity_id: + - input_select.zonenstatus + condition: [] + action: + - choose: + - conditions: + - condition: state + entity_id: input_select.zonenstatus + state: open + sequence: + - service: light.turn_on + data: {} + target: + area_id: + - eingang + - hackcenter + - kuche + - lounge + - conditions: + - condition: state + entity_id: input_select.zonenstatus + state: closed + sequence: + - service: light.turn_off + data: {} + target: + area_id: + - eingang + - hackcenter + - kuche + - lounge + + # ESPHOME Zonenstatus + - alias: "ANSIBLE_ESPHOME_Zonenstatus" + description: "" + mode: single + trigger: + - platform: state + entity_id: + - input_select.zonenstatus + condition: [] + action: + - choose: + - conditions: + - condition: state + entity_id: input_select.zonenstatus + state: "" + sequence: + - type: turn_on + device_id: 9f6aded98a4a96ab85c96b829895f449 + entity_id: switch.esphome_plug02_relay + domain: switch + - type: turn_on + device_id: 502f88ff07aa71cb053ad4112e0dd6bd + entity_id: switch.esphome_plug03_relay + domain: switch + - type: turn_on + device_id: 1637a583963ba02dc7baa17427f8ac00 + entity_id: switch.esphome_plug07_relay + domain: switch + - type: turn_on + device_id: 1da3229859c49c822fd8e9c630fa9004 + entity_id: switch.esphome_plug08_relay + domain: switch + - type: turn_on + device_id: 5e6ae37116ba1d3f3d95b8d571d28149 + entity_id: light.liba_logo_leds + domain: light + - type: turn_on + device_id: 5e6ae37116ba1d3f3d95b8d571d28149 + entity_id: light.kuehl_leds + domain: light + - type: turn_on + device_id: 7ba91dde6b1413340fdc66f2984dfd00 + entity_id: light.brightness + domain: light + - conditions: + - condition: state + entity_id: input_select.zonenstatus + state: "" + sequence: + - type: turn_off + device_id: 1dace6e3f89d85152cde6383312792eb + entity_id: switch.esphome_plug01_relay + domain: switch + - type: turn_off + device_id: 9f6aded98a4a96ab85c96b829895f449 + entity_id: switch.esphome_plug02_relay + domain: switch + - type: turn_off + device_id: 502f88ff07aa71cb053ad4112e0dd6bd + entity_id: switch.esphome_plug03_relay + domain: switch + - type: turn_off + device_id: b9ea4fd30dabfe365b5098c66eb1f4ba + entity_id: switch.esphome_plug04_relay + domain: switch + - type: turn_off + device_id: c5f54add49fda7640497b1883315d48b + entity_id: switch.esphome_plug05_relay + domain: switch + - type: turn_off + device_id: a0788c8cf4ee036ce43e0d563fdbdb3a + entity_id: switch.esphome_plug06_relay + domain: switch + - type: turn_off + device_id: 1637a583963ba02dc7baa17427f8ac00 + entity_id: switch.esphome_plug07_relay + domain: switch + - type: turn_off + device_id: 1da3229859c49c822fd8e9c630fa9004 + entity_id: switch.esphome_plug08_relay + domain: switch + - type: turn_off + device_id: 5e6ae37116ba1d3f3d95b8d571d28149 + entity_id: light.liba_logo_leds + domain: light + - type: turn_off + device_id: 5e6ae37116ba1d3f3d95b8d571d28149 + entity_id: light.kuehl_leds + domain: light + - type: turn_off + device_id: 7ba91dde6b1413340fdc66f2984dfd00 + entity_id: light.brightness + domain: light \ No newline at end of file -- GitLab