]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Added shelly em for new home and renamed the old one
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Thu, 3 Oct 2024 10:13:23 +0000 (12:13 +0200)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Thu, 3 Oct 2024 10:13:23 +0000 (12:13 +0200)
.storage/lovelace
.storage/lovelace.lovelace_devices
automations/energy.yaml
customizations/energy.yaml
log/logbook.yaml
log/recorder.yaml
packages/shelly/shelly_customizations.yaml
packages/shelly/shelly_groups.yaml
packages/shelly/shelly_log.yaml
utility_meter/energy.yaml

index de9034dfa30cd79953d0c4a2519b7bff624bf801..33defcb42c495e5d88d836b47b80fe5ed88a7096 100644 (file)
@@ -60,6 +60,9 @@
                 {
                   "entity": "sensor.shelly_em_channel_1_power"
                 },
+                {
+                  "entity": "sensor.shelly_em_old_channel_1_power"
+                },
                 {
                   "entity": "sensor.temperatura_balcone_temperature",
                   "display_type": "complete",
                         "grid-area": "second"
                       },
                       "entities": [
-                        "sensor.shelly_em_channel_1_power"
+                        "sensor.shelly_em_channel_1_power",
+                        "sensor.shelly_em_old_channel_1_power"
                       ],
                       "hours_to_show": 24,
                       "points_per_hour": 120,
           "path": "energy",
           "badges": [
             {
-              "entity": "sensor.shelly_em_channel_1_power"
+              "entity": "sensor.shelly_em_old_channel_1_power"
             },
             {
-              "entity": "sensor.shelly_em_channel_1_energy"
+              "entity": "sensor.shelly_em_old_channel_1_energy"
             },
             {
-              "entity": "sensor.shelly_em_channel_1_voltage"
+              "entity": "sensor.shelly_em_old_channel_1_voltage"
             }
           ],
           "cards": [
               "name": "Potenza Istantanea",
               "severity": {
                 "green": 0,
-                "red": 3000,
-                "yellow": 2000
+                "yellow": 2000,
+                "red": 3000
+              },
+              "type": "gauge",
+              "unit": "W",
+              "needle": true,
+              "view_layout": {
+                "position": "sidebar"
+              }
+            },
+            {
+              "entity": "sensor.shelly_em_old_channel_1_power",
+              "max": 4000,
+              "min": 0,
+              "name": "Potenza Istantanea",
+              "severity": {
+                "green": 0,
+                "yellow": 2000,
+                "red": 3000
               },
               "type": "gauge",
               "unit": "W",
             {
               "type": "custom:plotly-graph",
               "entities": [
-                "sensor.shelly_em_channel_1_power"
+                "sensor.shelly_em_channel_1_power",
+                "sensor.shelly_em_old_channel_1_power"
               ],
               "hours_to_show": 24,
               "refresh_interval": 0,
                 },
                 {
                   "entity": "sensor.consumo_energetico_mensile"
+                },
+                {
+                  "entity": "sensor.consumo_energetico_giornaliero_old"
+                },
+                {
+                  "entity": "sensor.consumo_energetico_mensile_old"
                 }
               ],
               "title": "Consumi",
index 008720902d1336a609e96e294f7ecbf5608fe39d..00f19d748ee8f7a2b6eabd2d543ec365f86eae98 100644 (file)
           "layout": {},
           "badges": [],
           "cards": [
+            {
+              "type": "entities",
+              "show_header_toggle": "off",
+              "visible": false,
+              "style": ".card-header {\n  padding: 0px 0px 0px 0px !important;\n}\n",
+              "entities": [
+                {
+                  "type": "section",
+                  "label": "Shelly EM"
+                },
+                {
+                  "type": "custom:hui-element",
+                  "card_type": "vertical-stack",
+                  "cards": [
+                    {
+                      "type": "horizontal-stack",
+                      "cards": [
+                        {
+                          "type": "picture",
+                          "style": "ha-card { \n    --paper-card-background-color: 'rgba(0, 0, 0, 0.0)';\n    --ha-card-background: \"rgba(0, 0, 0, 0)\";\n    --ha-card-box-shadow: 'none';\n}\n",
+                          "image": "/local/images/devices/shelly/shelly_em.png",
+                          "tap_action": {
+                            "action": "url",
+                            "url_path": "http://shellyem.giorgioravera.it"
+                          }
+                        },
+                        {
+                          "type": "vertical-stack",
+                          "cards": [
+                            {
+                              "type": "custom:button-card",
+                              "template": "template_device_generic_state",
+                              "entity": "sensor.shelly_em_channel_1_power",
+                              "name": "Potenza"
+                            },
+                            {
+                              "type": "custom:button-card",
+                              "template": "template_device_generic_state",
+                              "entity": "sensor.shelly_em_channel_1_voltage",
+                              "name": "Tensione",
+                              "icon": "mdi:alpha-v-box"
+                            },
+                            {
+                              "type": "custom:button-card",
+                              "template": "template_device_generic_state",
+                              "entity": "sensor.shelly_em_channel_1_power_factor",
+                              "name": "FP",
+                              "icon": "mdi:angle-acute"
+                            },
+                            {
+                              "type": "custom:button-card",
+                              "template": "template_device_firmware",
+                              "entity": "update.shelly_em_firmware_update",
+                              "name": "Firmare"
+                            },
+                            {
+                              "type": "custom:button-card",
+                              "template": "template_device_generic_button",
+                              "entity": "button.shelly_em_ota_update",
+                              "name": "Aggiorna Firmware",
+                              "icon": "mdi:package-up"
+                            },
+                            {
+                              "type": "custom:button-card",
+                              "template": "template_device_generic_button",
+                              "entity": "button.shelly_em_reboot",
+                              "name": "Riavvia Dispositivo",
+                              "icon": "mdi:restart"
+                            }
+                          ]
+                        }
+                      ]
+                    }
+                  ]
+                }
+              ]
+            },
             {
               "type": "entities",
               "show_header_toggle": "off",
               "entities": [
                 {
                   "type": "section",
-                  "label": "Shelly EM"
+                  "label": "Shelly EM (Old)"
                 },
                 {
                   "type": "custom:hui-element",
                           "image": "/local/images/devices/shelly/shelly_em.png",
                           "tap_action": {
                             "action": "url",
-                            "url_path": "http://shellyem.giorgioravera.it"
+                            "url_path": "http://shellyem-old.giorgioravera.it"
                           }
                         },
                         {
                             {
                               "type": "custom:button-card",
                               "template": "template_device_generic_state",
-                              "entity": "sensor.shelly_em_channel_1_power",
+                              "entity": "sensor.shelly_em_old_channel_1_power",
                               "name": "Potenza"
                             },
                             {
                               "type": "custom:button-card",
                               "template": "template_device_generic_state",
-                              "entity": "sensor.shelly_em_channel_1_voltage",
+                              "entity": "sensor.shelly_em_old_channel_1_voltage",
                               "name": "Tensione",
                               "icon": "mdi:alpha-v-box"
                             },
                             {
                               "type": "custom:button-card",
                               "template": "template_device_generic_state",
-                              "entity": "sensor.shelly_em_channel_1_power_factor",
+                              "entity": "sensor.shelly_em_old_channel_1_power_factor",
                               "name": "FP",
                               "icon": "mdi:angle-acute"
                             },
                             {
                               "type": "custom:button-card",
                               "template": "template_device_firmware",
-                              "entity": "update.shelly_em_firmware_update",
+                              "entity": "update.shelly_em_old_firmware_update",
                               "name": "Firmare"
                             },
                             {
                               "type": "custom:button-card",
                               "template": "template_device_generic_button",
-                              "entity": "button.shelly_em_ota_update",
+                              "entity": "button.shelly_em_old_ota_update",
                               "name": "Aggiorna Firmware",
                               "icon": "mdi:package-up"
                             },
                             {
                               "type": "custom:button-card",
                               "template": "template_device_generic_button",
-                              "entity": "button.shelly_em_reboot",
+                              "entity": "button.shelly_em_old_reboot",
                               "name": "Riavvia Dispositivo",
                               "icon": "mdi:restart"
                             }
index 661e01a1992b1eae546551a6c231227380fd89d5..84d9aac060311ffa026a2d6b4fab2cff9758d1f7 100644 (file)
@@ -9,6 +9,9 @@
     - platform: numeric_state
       entity_id: sensor.shelly_em_channel_1_power
       above: 3200
+    - platform: numeric_state
+      entity_id: sensor.shelly_em_old_channel_1_power
+      above: 3200
 
   action:
     service: script.notify_all
index 46ddd8296027887ecfa37201e85b5d00dfc48d75..4b05a217026bcf0b16df116b68b35ad975261525 100644 (file)
@@ -8,6 +8,12 @@ sensor.consumo_energetico_giornaliero:
 sensor.consumo_energetico_mensile:
   friendly_name: Consumo Energetico Mensile
 
+sensor.consumo_energetico_giornaliero_old:
+  friendly_name: Consumo Energetico Giornaliero (Old)
+
+sensor.consumo_energetico_mensile_old:
+  friendly_name: Consumo Energetico Mensile (Old)
+
 sensor.electricity_maps_intensita_della_co2:
   friendly_name: "CO2: Intensità di carbonio"
 
index 4c1fe44fc50faaa2670760af50c6ce6a903ef711..859f978cf4076eeaa84ab24ec6d6638ecc893931 100644 (file)
@@ -50,6 +50,8 @@ exclude:
     # Energy Sensors
     - sensor.consumo_energetico_giornaliero
     - sensor.consumo_energetico_mensile
+    - sensor.consumo_energetico_giornaliero_old
+    - sensor.consumo_energetico_mensile_old
     # Zigbee2mqtt
     - sensor.porta_casa_battery
     - sensor.porta_casa_linkquality
index 8fbde22f1895142baad66375fc268b8f29f904bd..14f3a2cc93a230adfe2cf778ca984d849fb8c441 100644 (file)
@@ -52,6 +52,8 @@ exclude:
     # Energy Sensors
     - sensor.consumo_energetico_giornaliero
     - sensor.consumo_energetico_mensile
+    - sensor.consumo_energetico_giornaliero_old
+    - sensor.consumo_energetico_mensile_old
     # Zigbee2mqtt
     - sensor.porta_casa_battery
     - sensor.porta_casa_linkquality
index a6fd6c28e370165e2f71d9cd237cefda3289fe33..e6f3391b56c7a29033898da581106edc9b9fdd65 100644 (file)
@@ -5,6 +5,46 @@
 homeassistant:
   customize:
 
+    # Shelly EM (shellyem_b9f0d0)
+    switch.shelly_em:
+      friendly_name: Pulsante
+    sensor.shelly_em_channel_1_power:
+      friendly_name: Potenza Istantanea
+    sensor.shelly_em_channel_1_energy:
+      friendly_name: Energia
+    sensor.shelly_em_channel_1_energy_cost:
+      friendly_name: Costo Energia
+    sensor.shelly_em_channel_1_energy_returned:
+      friendly_name: Energia Restituita
+    sensor.shelly_em_channel_1_voltage:
+      friendly_name: Tensione
+    sensor.shelly_em_channel_1_power_factor:
+      friendly_name: Fattore di Potenza Canale 1
+    sensor.shelly_em_channel_2_power:
+      friendly_name: Potenza Istantanea Canale 2
+    sensor.shelly_em_channel_2_energy:
+      friendly_name: Energia Canale 2
+    sensor.shelly_em_channel_2_energy_returned:
+      friendly_name: Energia Restituita Canale 2
+    sensor.shelly_em_channel_2_voltage:
+      friendly_name: Tensione Canale 2
+    sensor.shelly_em_channel_2_power_factor:
+      friendly_name: Fattore di Potenza Canale 2
+    binary_sensor.shelly_em_overpowering:
+      friendly_name: Sovraccarico Energetico
+    binary_sensor.shelly_em_cloud:
+      friendly_name: Connessione Cloud
+    update.shelly_em_firmware_update:
+      friendly_name: Aggiornamento Firmware
+    update.shelly_em_beta_firmware_update:
+      friendly_name: Aggiornamento Firmware Beta
+    sensor.shelly_em_rssi:
+      friendly_name: Potenza Segnale
+    sensor.shelly_em_uptime:
+      friendly_name: Uptime
+    button.shelly_em_reboot:
+      friendly_name: Riavvia Dispositivo
+
     # Shelly 1 - Tapparella Cucina (shellyswitch_55980f)
     sensor.tapparella_cucina_energy:
       friendly_name: Energia
@@ -254,41 +294,41 @@ homeassistant:
       friendly_name: Riavvia Dispositivo
 
     # Shelly EM (shellyem_b9e1a0)
-    switch.shelly_em:
-      friendly_name: Pulsante
-    sensor.shelly_em_channel_1_power:
-      friendly_name: Potenza Istantanea
-    sensor.shelly_em_channel_1_energy:
-      friendly_name: Energia
-    sensor.shelly_em_channel_1_energy_cost:
-      friendly_name: Costo Energia
-    sensor.shelly_em_channel_1_energy_returned:
-      friendly_name: Energia Restituita
-    sensor.shelly_em_channel_1_voltage:
-      friendly_name: Tensione
-    sensor.shelly_em_channel_2_power:
-      friendly_name: Potenza Istantanea Canale 2
-    sensor.shelly_em_channel_2_energy:
-      friendly_name: Energia Canale 2
-    sensor.shelly_em_channel_2_energy_returned:
-      friendly_name: Energia Restituita Canale 2
-    sensor.shelly_em_channel_2_voltage:
-      friendly_name: Tensione Canale 2
-    sensor.shelly_em_channel_1_power_factor:
+    switch.shelly_em_old:
+      friendly_name: Pulsante (Old)
+    sensor.shelly_em_old_channel_1_power:
+      friendly_name: Potenza Istantanea (Old)
+    sensor.shelly_em_old_channel_1_energy:
+      friendly_name: Energia (Old)
+    sensor.shelly_em_old_channel_1_energy_cost:
+      friendly_name: Costo Energia (Old)
+    sensor.shelly_em_old_channel_1_energy_returned:
+      friendly_name: Energia Restituita (Old)
+    sensor.shelly_em_old_channel_1_voltage:
+      friendly_name: Tensione (Old)
+    sensor.shelly_em_old_channel_1_power_factor:
       friendly_name: Fattore di Potenza Canale 1
-    sensor.shelly_em_channel_2_power_factor:
-      friendly_name: Fattore di Potenza Canale 2
-    binary_sensor.shelly_em_overpowering:
-      friendly_name: Sovraccarico Energetico
-    binary_sensor.shelly_em_cloud:
+    sensor.shelly_em_old_channel_2_power:
+      friendly_name: Potenza Istantanea Canale 2 (Old)
+    sensor.shelly_em_old_channel_2_energy:
+      friendly_name: Energia Canale 2 (Old)
+    sensor.shelly_em_old_channel_2_energy_returned:
+      friendly_name: Energia Restituita Canale 2 (Old)
+    sensor.shelly_em_old_channel_2_voltage:
+      friendly_name: Tensione Canale 2 (Old)
+    sensor.shelly_em_old_channel_2_power_factor:
+      friendly_name: Fattore di Potenza Canale 2 (Old)
+    binary_sensor.shelly_em_old_overpowering:
+      friendly_name: Sovraccarico Energetico (Old)
+    binary_sensor.shelly_em_old_cloud:
       friendly_name: Connessione Cloud
-    update.shelly_em_firmware_update:
+    update.shelly_em_old_firmware_update:
       friendly_name: Aggiornamento Firmware
-    update.shelly_em_beta_firmware_update:
+    update.shelly_em_old_beta_firmware_update:
       friendly_name: Aggiornamento Firmware Beta
-    sensor.shelly_em_rssi:
+    sensor.shelly_em_old_rssi:
       friendly_name: Potenza Segnale
-    sensor.shelly_em_uptime:
+    sensor.shelly_em_old_uptime:
       friendly_name: Uptime
-    button.shelly_em_reboot:
+    button.shelly_em_old_reboot:
       friendly_name: Riavvia Dispositivo
index 601ca85d7bed16d2300858c30d2515d52949ec2b..71ce7c643580492d8e814729bc8983e9c023e8a1 100644 (file)
@@ -7,6 +7,7 @@ group:
     name: Shelly Devices
     icon: mdi:alpha-s-box
     entities:
+      - update.shelly_em_firmware_update
       - update.tapparella_cucina_firmware_update
       - update.tapparella_sala_firmware_update
       - update.tapparella_studio_firmware_update
@@ -19,4 +20,4 @@ group:
       - update.luce_camera_firmware_update
       - update.luce_balcone_firmware_update
       #- update.luce_divano_firmware_update
-      - update.shelly_em_firmware_update
+      - update.shelly_em_old_firmware_update
index 18567062eecf83e5b0d1f3bb45eb145589180257..b494a48eabf67c2d2ea1d966910696c4ed23912a 100644 (file)
@@ -5,6 +5,24 @@
 logbook:
   exclude:
     entities:
+      # Shelly EM (shellyem_b9f0d0)
+      - switch.shelly_em
+      #- sensor.shelly_em_channel_1_power
+      - sensor.shelly_em_channel_1_energy
+      - sensor.shelly_em_channel_1_energy_cost
+      - sensor.shelly_em_channel_1_energy_returned
+      - sensor.shelly_em_channel_1_voltage
+      - sensor.shelly_em_channel_1_power_factor
+      - sensor.shelly_em_channel_2_power
+      - sensor.shelly_em_channel_2_energy
+      - sensor.shelly_em_channel_2_energy_returned
+      - sensor.shelly_em_channel_2_voltage
+      - sensor.shelly_em_channel_2_power_factor
+      - binary_sensor.shelly_em_overpowering
+      - binary_sensor.shelly_em_cloud
+      - update.shelly_em_firmware_update
+      - sensor.shelly_em_rssi
+      - sensor.shelly_em_uptime
       # Shelly 1 - Tapparella Cucina (shellyswitch_55980f)
       - sensor.tapparella_cucina_energy
       - sensor.tapparella_cucina_power
@@ -50,7 +68,7 @@ logbook:
       - sensor.luce_corridoio_uptime
       # Shelly 6 - Luce Cucina (shelly1_93B27D)
       - binary_sensor.luce_cucina_cloud
-      - binary_sensor.luce_cucina_firmware_update
+      - update.luce_cucina_firmware_update
       - sensor.luce_cucina_rssi
       - sensor.luce_cucina_uptime
       # Shelly 7 - Luce Sala (shellydimmer_d3ea58)
@@ -107,30 +125,48 @@ logbook:
       - sensor.luce_divano_uptime
       # Shelly EM (shellyem_b9e1a0)
       - switch.shelly_em
+      #- sensor.shelly_em_old_channel_1_power
+      - sensor.shelly_em_old_channel_1_energy
+      - sensor.shelly_em_old_channel_1_energy_cost
+      - sensor.shelly_em_old_channel_1_energy_returned
+      - sensor.shelly_em_old_channel_1_voltage
+      - sensor.shelly_em_old_channel_1_power_factor
+      - sensor.shelly_em_old_channel_2_power
+      - sensor.shelly_em_old_channel_2_energy
+      - sensor.shelly_em_old_channel_2_energy_returned
+      - sensor.shelly_em_old_channel_2_voltage
+      - sensor.shelly_em_old_channel_2_power_factor
+      - binary_sensor.shelly_em_old_overpowering
+      - binary_sensor.shelly_em_old_cloud
+      - update.shelly_em_old_firmware_update
+      - sensor.shelly_em_old_rssi
+      - sensor.shelly_em_old_uptime
+
+######################################################################
+# Shelly Package - Recorder
+######################################################################
+
+recorder:
+  exclude:
+    entities:
+      # Shelly EM (shellyem_b9f0d0)
+      - switch.shelly_em
       #- sensor.shelly_em_channel_1_power
-      - sensor.shelly_em_channel_1_energy
-      - sensor.shelly_em_channel_1_energy_cost
+      #- sensor.shelly_em_channel_1_energy
+      #- sensor.shelly_em_channel_1_energy_cost
       - sensor.shelly_em_channel_1_energy_returned
       - sensor.shelly_em_channel_1_voltage
+      - sensor.shelly_em_channel_2_power_factor
       - sensor.shelly_em_channel_2_power
       - sensor.shelly_em_channel_2_energy
       - sensor.shelly_em_channel_2_energy_returned
       - sensor.shelly_em_channel_2_voltage
       - sensor.shelly_em_channel_1_power_factor
-      - sensor.shelly_em_channel_2_power_factor
       - binary_sensor.shelly_em_overpowering
       - binary_sensor.shelly_em_cloud
       - update.shelly_em_firmware_update
       - sensor.shelly_em_rssi
       - sensor.shelly_em_uptime
-
-######################################################################
-# Shelly Package - Recorder
-######################################################################
-
-recorder:
-  exclude:
-    entities:
       # Shelly 1 - Tapparella Cucina (shellyswitch_55980f)
       - sensor.tapparella_cucina_energy
       - sensor.tapparella_cucina_power
@@ -233,19 +269,19 @@ recorder:
       - sensor.luce_divano_uptime
       # Shelly EM (shellyem_b9e1a0)
       - switch.shelly_em
-      #- sensor.shelly_em_channel_1_power
-      #- sensor.shelly_em_channel_1_energy
-      #- sensor.shelly_em_channel_1_energy_cost
-      - sensor.shelly_em_channel_1_energy_returned
-      - sensor.shelly_em_channel_1_voltage
-      - sensor.shelly_em_channel_2_power
-      - sensor.shelly_em_channel_2_energy
-      - sensor.shelly_em_channel_2_energy_returned
-      - sensor.shelly_em_channel_2_voltage
-      - sensor.shelly_em_channel_1_power_factor
-      - sensor.shelly_em_channel_2_power_factor
-      - binary_sensor.shelly_em_overpowering
-      - binary_sensor.shelly_em_cloud
-      - update.shelly_em_firmware_update
-      - sensor.shelly_em_rssi
-      - sensor.shelly_em_uptime
+      #- sensor.shelly_em_old_channel_1_power
+      #- sensor.shelly_em_old_channel_1_energy
+      #- sensor.shelly_em_old_channel_1_energy_cost
+      - sensor.shelly_em_old_channel_1_energy_returned
+      - sensor.shelly_em_old_channel_1_voltage
+      - sensor.shelly_em_old_channel_1_power_factor
+      - sensor.shelly_em_old_channel_2_power
+      - sensor.shelly_em_old_channel_2_energy
+      - sensor.shelly_em_old_channel_2_energy_returned
+      - sensor.shelly_em_old_channel_2_voltage
+      - sensor.shelly_em_old_channel_2_power_factor
+      - binary_sensor.shelly_em_old_overpowering
+      - binary_sensor.shelly_em_old_cloud
+      - update.shelly_em_old_firmware_update
+      - sensor.shelly_em_old_rssi
+      - sensor.shelly_em_old_uptime
index 5967fe721f4f0f6ddfed92d917aca8eb1cf1f26e..92cd331937abc39577c1d617d7daa6b6c418a6dc 100644 (file)
@@ -9,3 +9,11 @@ consumo_energetico_giornaliero:
 consumo_energetico_mensile:
   source: sensor.shelly_em_channel_1_energy
   cycle: monthly
+
+consumo_energetico_giornaliero_old:
+  source: sensor.shelly_em_old_channel_1_energy
+  cycle: daily
+
+consumo_energetico_mensile_old:
+  source: sensor.shelly_em_old_channel_1_energy
+  cycle: monthly