]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Added Shelly 1 to Living Room
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Fri, 27 Dec 2019 11:32:35 +0000 (12:32 +0100)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Fri, 27 Dec 2019 11:32:35 +0000 (12:32 +0100)
13 files changed:
components/google_assistant/home_assistant.yaml
components/google_assistant/light.yaml
customizations/speech_engine.yaml
group/lights.yaml
group/lights_livingroom.yaml
group/shelly.yaml
light/all.yaml
light/sala.yaml
script/speech_engine.yaml
shell_scripts/shelly_reboot.sh
shell_scripts/shelly_upgrade.sh
shell_scripts/shelly_version.sh
ui-lovelace.yaml

index 89dd78e5db504bb780f80c3d777c634176c3322f..427bcef9e5a095177aea521949191380043e1225 100644 (file)
@@ -10,6 +10,10 @@ script.speech_status:
   name: Stato Casa
   expose: true
   room: Generale
+script.speech_consumption:
+  name: Consumo Casa
+  expose: true
+  room: Generale
 script.homeassistant_restart:
   name: Riavvia Homeassistant
   expose: true
index 1f8bc8a8b310a44c8970203d0ec154eb38950e60..d6fba7a072559a6f86878e5180348b457fd89fa6 100644 (file)
@@ -8,6 +8,9 @@ light.luce_corridoio:
 light.luce_cucina:
   expose: true
   room: Cucina
+light.luce_sala:
+  expose: true
+  room: Sala
 light.luce_divano:
   expose: true
   room: Sala
index 35316aca9890938485ba64b10c5ac9b82e8aecbc..b0f84647babcab9f1bd2dbac6619cfc5d5273564 100644 (file)
@@ -4,6 +4,7 @@
 
 script.speech_engine:
   icon: mdi:text-to-speech
-
 script.speech_status:
   icon: mdi:voice
+script.speech_consumption:
+  icon: mdi:power-plug
index 291df9118b857098ebfc67690002617d08afafd9..9945e8e37c3573402cbac23acbddfd7242f136d3 100644 (file)
@@ -9,6 +9,7 @@ lights:
   entities:
     - light.luce_cucina
     - light.luce_corridoio
+    - light.luce_sala
     - light.luce_divano
     - light.luce_bagno
     - light.luce_specchio
index 4c3fe8db9f202c2ca26eb21f4d920c8ee40ed216..0969e595865ec8f12a95080568cf4e3f083b9725 100644 (file)
@@ -7,5 +7,6 @@ lights_livingroom:
   view: true
   icon: mdi:lightbulb
   entities:
+    - light.luce_sala
     - light.luce_divano
-    - light.luce_divano_bianca
+#    - light.luce_divano_bianca
index dcb499539e457a853cb006b4d2f113b894492b05..8f7ce52562972f650fa5ffad068e2e71ba35e438 100644 (file)
@@ -16,6 +16,7 @@ shelly:
     - sensor.shelly7_status
     - sensor.shelly8_status
     - sensor.shelly9_status
+    - sensor.shelly10_status
     - sensor.shellybulb_status
     - sensor.shellyem_status
     - sensor.shellyplugs_status
index fd3b0e1b5f02ffa65fca904b88ed986f32e46a17..7ffa05b5b61fe120161fec1fb76d8cd0eb59b692 100644 (file)
@@ -7,6 +7,7 @@
   entities:
     - light.luce_corridoio
     - light.luce_cucina
+    - light.luce_sala
     - light.luce_divano
     - light.luce_bagno
     - light.luce_specchio
index f22477dcf23ec77decf92fff5bf1b08df9634b3f..19649c4044bef05ec2016b528f8d3e68c471bdf6 100644 (file)
@@ -1,5 +1,19 @@
 ######################################################################
-# Living Room Light (Color)
+# Living Room Light
+######################################################################
+
+- platform: mqtt
+  name: Luce Sala
+  command_topic: "shellies/shelly1-C426F9/relay/0/command"
+  state_topic: "shellies/shelly1-C426F9/relay/0"
+  payload_on: "on"
+  payload_off: "off"
+  retain: false
+  qos: 0
+  optimistic: false
+
+######################################################################
+# Living Room Couch Light (Color)
 ######################################################################
 
 - platform: mqtt
   optimistic: false
 
 ######################################################################
-# Living Room Light (White)
+# Living Room Couch Light (White)
 ######################################################################
 
 #- platform: mqtt
       friendly_name: "Luci Sala"
       turn_on:
         service: light.turn_on
-        entity_id: "light.luce_divano"
+        entity_id: "light.luce_sala, light.luce_divano"
       turn_off:
         service: light.turn_off
-        entity_id: "light.luce_divano"
+        entity_id: "light.luce_sala, light.luce_divano"
       value_template: >-
         {% if is_state('light.luce_divano', 'on') or is_state('light.luce_divano_bianca', 'on') %}
           on
index f83dc07b64af6700cd3c03ce81a3276ac2fe3343..3499e159715fc86c3e342b38f121d8e212f92394 100644 (file)
@@ -99,6 +99,11 @@ speech_engine:
             {%- endfor %}
           {%- endmacro -%}
           
+          {# Consumption Status #}
+          {%- macro status_consumption() -%}
+          "Il consumo istantaneo è pari a {{ states.sensor.potenza_istantanea.state }} watt"
+          {%- endmacro -%}
+          
           {# Car Status #}
           {%- macro status_car() -%}
             {% if is_state('device_tracker.wdd1760081v167576', 'Casa') %}
@@ -171,6 +176,8 @@ speech_engine:
             {{ status_lights() }}
               
             {{ status_covers() }}
+            
+            {{ status_consumption() }}
                             
           {% endif %}
           
@@ -204,3 +211,19 @@ speech_status:
       data:
         enable_greeting: 1
         enable_status: 1
+
+######################################################################
+# Speech Consumption
+#
+# Operations:
+# - script.speech_engine
+######################################################################
+
+speech_consumption:
+  alias: Consumo Energetico
+  sequence:
+    - service: script.speech_engine
+      data_template:
+        language: 'it'
+        message: >-
+          "Il consumo istantaneo è pari a {{ states.sensor.potenza_istantanea.state }} watt"
index 2be5768cd50dcd23d1cfd2f38ed3fab1e9ca5028..78ce1aabe1a1a90261a5783f5a65f99e93bc1b7b 100755 (executable)
@@ -13,6 +13,7 @@ SHELLY_ID=(
        shelly7.giorgioravera.it
        shelly8.giorgioravera.it
        shelly9.giorgioravera.it
+       shelly10.giorgioravera.it
        shellybulb.giorgioravera.it
        shellyem.giorgioravera.it
        shellyplugs.giorgioravera.it
index 644afa9b19209b02799563d41e9fa6d3726473ce..c0ebeebd35dbb0bdc139dc2a25aeb03ddfc01786 100755 (executable)
@@ -11,6 +11,7 @@ SHELLY_ID=(
        shellyswitch-559C49
        shelly1-24D1EE
        shelly1-93B27D
+       shelly1-C426F9
        shellyswitch25-7457D8
        shelly1-59E18C
        shelly1-24D1A8
index 0eaa0b7c7ee467df34d8000036aeefef4fdc9d69..80ec53ec9af6667d6b4256c79cf57a83f6c4ad07 100755 (executable)
@@ -13,6 +13,7 @@ SHELLY_ID=(
        shelly7.giorgioravera.it
        shelly8.giorgioravera.it
        shelly9.giorgioravera.it
+       shelly7.giorgioravera.it
        shellybulb.giorgioravera.it
        shellyem.giorgioravera.it
        shellyplugs.giorgioravera.it
index 76114d1719b3c2eee4dcfcbdeb2796368707eb8b..62239565884d2a576b6892df17fbac4c41f92c11 100644 (file)
@@ -47,9 +47,9 @@ views:
       state_image:
         "on": /local/images/rooms/sala_on.jpg
         "off": /local/images/rooms/sala_off.jpg
-      entity: light.luce_divano
-      #entity: group.lights_livingroom
+      entity: group.lights_livingroom
       entities: 
+      - light.luce_sala
       - light.luce_divano
       #- light.luce_divano_bianca
       - cover.tapparella_sala
@@ -73,8 +73,7 @@ views:
       state_image:
         "on": /local/images/rooms/bagno_on.jpg
         "off": /local/images/rooms/bagno_off.jpg
-      entity: light.luce_bagno
-      #entity: group.lights_bathroom
+      entity: group.lights_bathroom
       entities: 
       - light.luce_bagno
       - light.luce_specchio
@@ -125,6 +124,7 @@ views:
       show_header_toggle: false
       entities:
       - script.speech_status
+      - script.speech_consumption
       - automation.risveglio_giorgio
 
     - type: entities
@@ -142,6 +142,7 @@ views:
     badges:
       - light.luce_cucina
       - light.luce_corridoio
+      - light.luce_sala
       - light.luce_divano
       - light.luce_bagno
       - light.luce_specchio
@@ -156,6 +157,7 @@ views:
         - light.luce_cucina
         - light.luce_corridoio
         - light.luci_sala
+        - light.luce_sala
         - light.luce_divano
         #- light.luce_divano_bianca
         - light.luci_bagno