From: Giorgio Ravera Date: Thu, 3 Oct 2024 10:13:23 +0000 (+0200) Subject: Added shelly em for new home and renamed the old one X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=e523eec03a0bc6a127cbbc56415ba85399656878;p=homeassistant.git Added shelly em for new home and renamed the old one --- diff --git a/.storage/lovelace b/.storage/lovelace index de9034df..33defcb4 100644 --- a/.storage/lovelace +++ b/.storage/lovelace @@ -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", @@ -289,7 +292,8 @@ "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, @@ -1592,13 +1596,13 @@ "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": [ @@ -1609,8 +1613,25 @@ "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", @@ -1656,7 +1677,8 @@ { "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, @@ -1707,6 +1729,12 @@ }, { "entity": "sensor.consumo_energetico_mensile" + }, + { + "entity": "sensor.consumo_energetico_giornaliero_old" + }, + { + "entity": "sensor.consumo_energetico_mensile_old" } ], "title": "Consumi", diff --git a/.storage/lovelace.lovelace_devices b/.storage/lovelace.lovelace_devices index 00872090..00f19d74 100644 --- a/.storage/lovelace.lovelace_devices +++ b/.storage/lovelace.lovelace_devices @@ -2468,6 +2468,83 @@ "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", @@ -3165,7 +3242,7 @@ "entities": [ { "type": "section", - "label": "Shelly EM" + "label": "Shelly EM (Old)" }, { "type": "custom:hui-element", @@ -3180,7 +3257,7 @@ "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" } }, { @@ -3189,40 +3266,40 @@ { "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" } diff --git a/automations/energy.yaml b/automations/energy.yaml index 661e01a1..84d9aac0 100644 --- a/automations/energy.yaml +++ b/automations/energy.yaml @@ -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 diff --git a/customizations/energy.yaml b/customizations/energy.yaml index 46ddd829..4b05a217 100644 --- a/customizations/energy.yaml +++ b/customizations/energy.yaml @@ -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" diff --git a/log/logbook.yaml b/log/logbook.yaml index 4c1fe44f..859f978c 100644 --- a/log/logbook.yaml +++ b/log/logbook.yaml @@ -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 diff --git a/log/recorder.yaml b/log/recorder.yaml index 8fbde22f..14f3a2cc 100644 --- a/log/recorder.yaml +++ b/log/recorder.yaml @@ -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 diff --git a/packages/shelly/shelly_customizations.yaml b/packages/shelly/shelly_customizations.yaml index a6fd6c28..e6f3391b 100644 --- a/packages/shelly/shelly_customizations.yaml +++ b/packages/shelly/shelly_customizations.yaml @@ -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 diff --git a/packages/shelly/shelly_groups.yaml b/packages/shelly/shelly_groups.yaml index 601ca85d..71ce7c64 100644 --- a/packages/shelly/shelly_groups.yaml +++ b/packages/shelly/shelly_groups.yaml @@ -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 diff --git a/packages/shelly/shelly_log.yaml b/packages/shelly/shelly_log.yaml index 18567062..b494a48e 100644 --- a/packages/shelly/shelly_log.yaml +++ b/packages/shelly/shelly_log.yaml @@ -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 diff --git a/utility_meter/energy.yaml b/utility_meter/energy.yaml index 5967fe72..92cd3319 100644 --- a/utility_meter/energy.yaml +++ b/utility_meter/energy.yaml @@ -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