]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Introduced Light balcony - not lovelace
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Wed, 18 Mar 2020 17:50:09 +0000 (18:50 +0100)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Wed, 18 Mar 2020 17:50:09 +0000 (18:50 +0100)
12 files changed:
components/google_assistant/light.yaml
group/lights.yaml
group/shelly.yaml
light/all.yaml
light/balcone.yaml [new file with mode: 0644]
script/shelly.yaml
script/speech_engine.yaml
shell_scripts/shelly_reboot.sh
shell_scripts/shelly_upgrade.sh
shell_scripts/shelly_version.sh
www/images/rooms/balcone_off.jpg [new file with mode: 0644]
www/images/rooms/balcone_on.jpg [new file with mode: 0644]

index d6fba7a072559a6f86878e5180348b457fd89fa6..cc64abfddf8685b9873f62cfc619e2c0efbc18e6 100644 (file)
@@ -26,3 +26,6 @@ light.luce_studio:
 light.luce_camera:
   expose: true
   room: Camera
+light.luce_balcone:
+  expose: true
+  room: Balcone
\ No newline at end of file
index 0f3c393b17ef2a6d2af1f47c8ffe8f7f6af11efa..30bf7dcac2331df9501840731d2ef4e5409ae2e2 100644 (file)
@@ -14,3 +14,4 @@ lights:
     - light.luce_specchio
     - light.luce_studio
     - light.luce_camera
+    - light.luce_balcone
index 947b76d02d05c73310e699a4e83a2495744c56f8..be320201c57444c11369e089feec9616b1dc0122 100644 (file)
@@ -16,6 +16,7 @@ shelly:
     - sensor.shelly8_status
     - sensor.shelly9_status
     - sensor.shelly10_status
+    - sensor.shelly11_status
     - sensor.shellybulb_status
     - sensor.shellyem_status
     - sensor.shellydw_status
index 7ffa05b5b61fe120161fec1fb76d8cd0eb59b692..2d0ad981ac9994bfc53a189ad802502c45c3fa64 100644 (file)
@@ -13,3 +13,4 @@
     - light.luce_specchio
     - light.luce_studio
     - light.luce_camera
+    - light.luce_balcone
diff --git a/light/balcone.yaml b/light/balcone.yaml
new file mode 100644 (file)
index 0000000..a503f31
--- /dev/null
@@ -0,0 +1,13 @@
+######################################################################
+# Balcony Light
+######################################################################
+
+- platform: mqtt
+  name: Luce Balcone
+  command_topic: "shellies/shelly1-C423C8/relay/0/command"
+  state_topic: "shellies/shelly1-C423C8/relay/0"
+  payload_on: "on"
+  payload_off: "off"
+  retain: false
+  qos: 0
+  optimistic: false
index d6b349b611476aadeb9376bf3cd854bee3227f01..1ab9d8aa7b96948aa8081d219048e87117b8f663 100644 (file)
@@ -72,6 +72,12 @@ shelly_upgrade:
         topic: 'shellies/shelly1-24D1A8/command'
         payload: 'update_fw'
 
+    # Shelly 1 Luce Balcone
+    - service: mqtt.publish
+      data:
+        topic: 'shellies/shelly1-C423C8/command'
+        payload: 'update_fw'
+
     # Shelly EM
     - service: mqtt.publish
       data:
index 8a53f9634ff99bea576f34287c1df91d4855872b..bc11f47bf35a26e97a534c13566f3abd7ef8795e 100644 (file)
@@ -73,7 +73,19 @@ speech_engine:
             {% set year = now().strftime('%Y') %}
             Sono le {{ hour }} e {{ min }} del {{ day }} {{ mounth }} {{ year }}
           {%- endmacro -%}
-            
+          
+          {# Door Status #}
+          {%- macro status_door() -%}
+            {% for entity_id in states.group.doors.attributes.entity_id  %}
+              {% set name = entity_id.split('.')[1]|replace('_', ' ') %}
+              {% if is_state(entity_id, 'off') %}
+                La {{ name }} è chiusa.
+              {% else %}
+                La {{ name }} è aperta.
+              {% endif %}
+            {%- endfor %}
+          {%- endmacro -%}
+          
           {# Lights Status #}
           {%- macro status_lights() -%}
             {% for entity_id in states.group.lights.attributes.entity_id  %}
@@ -172,7 +184,9 @@ speech_engine:
           {% if enable_status | int == 1 %}
               
             {{ time_and_date() }}
-              
+            
+            {{ status_door() }}
+            
             {{ status_lights() }}
               
             {{ status_covers() }}
index e27153bd7416c5da20920a646eb934dd0809254f..00eaa4caf4d01a7f99c796dc74ffc4e568d50729 100755 (executable)
@@ -14,6 +14,7 @@ SHELLY_ID=(
        shelly8.giorgioravera.it
        shelly9.giorgioravera.it
        shelly10.giorgioravera.it
+  shelly11.giorgioravera.it
        shellybulb.giorgioravera.it
        shellyem.giorgioravera.it
        shellydw.giorgioravera.it
index 254aeb27456e710c1a34fe3dc3c266fabb5886b2..79f65f2fbd10632c2ae6dd7f8d7d82ca31e6d9ef 100755 (executable)
@@ -16,6 +16,7 @@ SHELLY_ID=(
        shellyswitch25-7457D8
        shelly1-59E18C
        shelly1-24D1A8
+  shelly1-C423C8
        shellyem-B9E1A0
        shellydw-B88F53
        shellyplug-s-7A31CB
index 2af38fba562c3cad1edbb9b70388e18bb2a65c5e..746e6d5e8e4495043de63dc21dd807b4ed6704ef 100755 (executable)
@@ -14,6 +14,7 @@ SHELLY_ID=(
        shelly8.giorgioravera.it
        shelly9.giorgioravera.it
        shelly10.giorgioravera.it
+  shelly11.giorgioravera.it
        shellybulb.giorgioravera.it
        shellyem.giorgioravera.it
        shellydw.giorgioravera.it
diff --git a/www/images/rooms/balcone_off.jpg b/www/images/rooms/balcone_off.jpg
new file mode 100644 (file)
index 0000000..4f727a4
Binary files /dev/null and b/www/images/rooms/balcone_off.jpg differ
diff --git a/www/images/rooms/balcone_on.jpg b/www/images/rooms/balcone_on.jpg
new file mode 100644 (file)
index 0000000..eb03bb2
Binary files /dev/null and b/www/images/rooms/balcone_on.jpg differ