From c2bbe4f7388d744e52e95c6fb996be612bf9a60e Mon Sep 17 00:00:00 2001
From: 3D <3d@n3rd3d.com>
Date: Wed, 1 Feb 2023 23:45:28 +0100
Subject: [PATCH] commit message

---
 .../templates/config/esphome_display02.yaml               | 4 ++++
 .../templates/config/esphome_kuehlschrank.yaml            | 8 ++++----
 .../docker_esphome/templates/config/esphome_plug01.yaml   | 4 ++++
 .../docker_esphome/templates/config/esphome_plug02.yaml   | 4 ++++
 .../docker_esphome/templates/config/esphome_plug03.yaml   | 4 ++++
 .../docker_esphome/templates/config/esphome_plug04.yaml   | 4 ++++
 .../docker_esphome/templates/config/esphome_plug05.yaml   | 4 ++++
 .../docker_esphome/templates/config/esphome_plug06.yaml   | 4 ++++
 .../docker_esphome/templates/config/esphome_plug07.yaml   | 4 ++++
 .../docker_esphome/templates/config/esphome_plug08.yaml   | 4 ++++
 10 files changed, 40 insertions(+), 4 deletions(-)

diff --git a/intern/docker_esphome/templates/config/esphome_display02.yaml b/intern/docker_esphome/templates/config/esphome_display02.yaml
index 549c0697..a57b4fc1 100644
--- a/intern/docker_esphome/templates/config/esphome_display02.yaml
+++ b/intern/docker_esphome/templates/config/esphome_display02.yaml
@@ -27,6 +27,10 @@ external_components:
       payload: "OFF"
       then:
         - light.turn_off: matrix_light
+    - topic: warpzone/door/status
+      payload: "CLOSED"
+      then:
+        - light.turn_off: matrix_light
 
 light:
   - platform: monochromatic
diff --git a/intern/docker_esphome/templates/config/esphome_kuehlschrank.yaml b/intern/docker_esphome/templates/config/esphome_kuehlschrank.yaml
index 954529f8..3f30d3ec 100644
--- a/intern/docker_esphome/templates/config/esphome_kuehlschrank.yaml
+++ b/intern/docker_esphome/templates/config/esphome_kuehlschrank.yaml
@@ -28,8 +28,8 @@
 {% include "/includes/common.inc.yaml" %}
 
   on_message:
-    - topic: ESPHome/{{ devicename }}/state/command
-      payload: "ON"
+    - topic: warpzone/status/door
+      payload: "OPEN"
       then:
         - light.turn_on: 
             id: logo_led
@@ -39,8 +39,8 @@
             id: kuehl_led
             effect: "Rainbow"
             brightness: 100%
-    - topic: ESPHome/{{ devicename }}/state/command
-      payload: "OFF"
+    - topic: warpzone/door/status
+      payload: "CLOSED"
       then:
         - light.turn_off: logo_led
         - light.turn_off: kuehl_led
diff --git a/intern/docker_esphome/templates/config/esphome_plug01.yaml b/intern/docker_esphome/templates/config/esphome_plug01.yaml
index 4345033c..efffc1d9 100644
--- a/intern/docker_esphome/templates/config/esphome_plug01.yaml
+++ b/intern/docker_esphome/templates/config/esphome_plug01.yaml
@@ -15,6 +15,10 @@
       payload: "OFF"
       then:
         - switch.turn_off: relay
+    - topic: warpzone/door/status
+      payload: "CLOSED"
+      then:
+        - switch.turn_off: relay
 
 status_led:
   pin:
diff --git a/intern/docker_esphome/templates/config/esphome_plug02.yaml b/intern/docker_esphome/templates/config/esphome_plug02.yaml
index 0bad6f3d..c613318b 100644
--- a/intern/docker_esphome/templates/config/esphome_plug02.yaml
+++ b/intern/docker_esphome/templates/config/esphome_plug02.yaml
@@ -15,6 +15,10 @@
       payload: "OFF"
       then:
         - switch.turn_off: relay
+    - topic: warpzone/door/status
+      payload: "CLOSED"
+      then:
+        - switch.turn_off: relay
 
 status_led:
   pin:
diff --git a/intern/docker_esphome/templates/config/esphome_plug03.yaml b/intern/docker_esphome/templates/config/esphome_plug03.yaml
index 0048c0c3..07c62e6f 100644
--- a/intern/docker_esphome/templates/config/esphome_plug03.yaml
+++ b/intern/docker_esphome/templates/config/esphome_plug03.yaml
@@ -15,6 +15,10 @@
       payload: "OFF"
       then:
         - switch.turn_off: relay
+    - topic: warpzone/door/status
+      payload: "CLOSED"
+      then:
+        - switch.turn_off: relay
 
 status_led:
   pin:
diff --git a/intern/docker_esphome/templates/config/esphome_plug04.yaml b/intern/docker_esphome/templates/config/esphome_plug04.yaml
index e1471832..04ecaa88 100644
--- a/intern/docker_esphome/templates/config/esphome_plug04.yaml
+++ b/intern/docker_esphome/templates/config/esphome_plug04.yaml
@@ -15,6 +15,10 @@
       payload: "OFF"
       then:
         - switch.turn_off: relay
+    - topic: warpzone/door/status
+      payload: "CLOSED"
+      then:
+        - switch.turn_off: relay
 
 status_led:
   pin:
diff --git a/intern/docker_esphome/templates/config/esphome_plug05.yaml b/intern/docker_esphome/templates/config/esphome_plug05.yaml
index 9608a94e..9ba0939d 100644
--- a/intern/docker_esphome/templates/config/esphome_plug05.yaml
+++ b/intern/docker_esphome/templates/config/esphome_plug05.yaml
@@ -15,6 +15,10 @@
       payload: "OFF"
       then:
         - switch.turn_off: relay
+    - topic: warpzone/door/status
+      payload: "CLOSED"
+      then:
+        - switch.turn_off: relay
         
 substitutions:
   plug_name: {{ devicename }}
diff --git a/intern/docker_esphome/templates/config/esphome_plug06.yaml b/intern/docker_esphome/templates/config/esphome_plug06.yaml
index 595a4dbf..2940f952 100644
--- a/intern/docker_esphome/templates/config/esphome_plug06.yaml
+++ b/intern/docker_esphome/templates/config/esphome_plug06.yaml
@@ -15,6 +15,10 @@
       payload: "OFF"
       then:
         - switch.turn_off: relay
+    - topic: warpzone/door/status
+      payload: "CLOSED"
+      then:
+        - switch.turn_off: relay
         
 substitutions:
   plug_name: {{ devicename }}
diff --git a/intern/docker_esphome/templates/config/esphome_plug07.yaml b/intern/docker_esphome/templates/config/esphome_plug07.yaml
index cc47304b..a2d482ab 100644
--- a/intern/docker_esphome/templates/config/esphome_plug07.yaml
+++ b/intern/docker_esphome/templates/config/esphome_plug07.yaml
@@ -15,6 +15,10 @@
       payload: "OFF"
       then:
         - switch.turn_off: relay
+    - topic: warpzone/door/status
+      payload: "CLOSED"
+      then:
+        - switch.turn_off: relay
         
 substitutions:
   plug_name: {{ devicename }}
diff --git a/intern/docker_esphome/templates/config/esphome_plug08.yaml b/intern/docker_esphome/templates/config/esphome_plug08.yaml
index 5c118347..78daa4fb 100644
--- a/intern/docker_esphome/templates/config/esphome_plug08.yaml
+++ b/intern/docker_esphome/templates/config/esphome_plug08.yaml
@@ -15,6 +15,10 @@
       payload: "OFF"
       then:
         - switch.turn_off: relay
+    - topic: warpzone/door/status
+      payload: "CLOSED"
+      then:
+        - switch.turn_off: relay
         
 substitutions:
   plug_name: {{ devicename }}
-- 
GitLab