From 668b8cbbec9343a5f42312ab840a1729e901000a Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Tue, 6 Jul 2021 17:40:23 +0200 Subject: [PATCH] Moved shelly from mqtt to native integration (with the exception of shelly bulb) --- .storage/lovelace | 130 ++++++-- .storage/lovelace_resources | 9 +- automations/energy.yaml | 4 +- cover/camera.yaml | 17 - cover/cucina.yaml | 17 - cover/sala.yaml | 17 - cover/studio.yaml | 17 - light/bagno.yaml | 28 -- light/balcone.yaml | 13 - light/camera.yaml | 26 -- light/corridoio.yaml | 13 - light/cucina.yaml | 13 - light/sala.yaml | 27 -- light/studio.yaml | 13 - log/history.yaml | 3 - log/logbook.yaml | 3 - log/recorder.yaml | 3 - packages/shelly/shelly_customizations.yaml | 231 +++++++++++++- packages/shelly/shelly_log.yaml | 345 +++++++++++++++++++++ sensor/energy.yaml | 46 --- templates/speech_message.yaml | 2 +- utility_meter/energy.yaml | 4 +- 22 files changed, 690 insertions(+), 291 deletions(-) delete mode 100644 cover/camera.yaml delete mode 100644 cover/cucina.yaml delete mode 100644 cover/sala.yaml delete mode 100644 cover/studio.yaml delete mode 100644 light/balcone.yaml delete mode 100644 light/camera.yaml delete mode 100644 light/corridoio.yaml delete mode 100644 light/cucina.yaml delete mode 100644 light/studio.yaml delete mode 100644 sensor/energy.yaml diff --git a/.storage/lovelace b/.storage/lovelace index de5c3c54..fcea7d53 100644 --- a/.storage/lovelace +++ b/.storage/lovelace @@ -41,7 +41,7 @@ "entity": "binary_sensor.central_heating" }, { - "entity": "sensor.potenza_istantanea" + "entity": "sensor.shelly_em_channel_1_power" }, { "entity": "sensor.front_balcony_temperature" @@ -267,30 +267,100 @@ "type": "vertical-stack" }, { - "detail": 2, - "entity": "sensor.potenza_istantanea", - "graph": "line", - "type": "sensor", - "unit": "W" + "type": "custom:mini-graph-card", + "entities": [ + "sensor.potenza_istantanea" + ], + "hours_to_show": 24, + "points_per_hour": 120, + "line_width": 3, + "color_thresholds": [ + { + "value": 0, + "color": "#00ff00" + }, + { + "value": 1500, + "color": "#c0392b" + }, + { + "value": 2500, + "color": "#c0392b" + } + ], + "decimals": 0, + "hour24": true }, { + "type": "horizontal-stack", "cards": [ { - "detail": 1, - "entity": "sensor.front_balcony_temperature", - "graph": "line", - "name": "Temperatura Balcone", - "type": "sensor" + "type": "custom:mini-graph-card", + "entities": [ + { + "entity": "sensor.front_balcony_temperature", + "name": "Balcone" + } + ], + "name": "Balcone", + "hours_to_show": 24, + "points_per_hour": 1, + "show": { + "name": true, + "state": true + }, + "line_width": 5, + "color_thresholds": [ + { + "value": 16, + "color": "#4a90e2" + }, + { + "value": 19, + "color": "#ffbd00" + }, + { + "value": 23, + "color": "#ee7c3a" + } + ], + "hour24": true, + "decimals": 0 }, { - "detail": 1, - "entity": "sensor.rear_balcony_temperature", - "graph": "line", - "name": "Temperatura Veranda", - "type": "sensor" + "type": "custom:mini-graph-card", + "entities": [ + { + "entity": "sensor.rear_balcony_temperature", + "name": "Veranda" + } + ], + "name": "Veranda", + "hours_to_show": 24, + "points_per_hour": 1, + "show": { + "name": true, + "state": true + }, + "line_width": 5, + "color_thresholds": [ + { + "value": 16, + "color": "#4a90e2" + }, + { + "value": 19, + "color": "#ffbd00" + }, + { + "value": 23, + "color": "#ee7c3a" + } + ], + "hour24": true, + "decimals": 0 } - ], - "type": "vertical-stack" + ] } ] }, @@ -1219,22 +1289,31 @@ ] }, { + "icon": "mdi:flash", + "id": "power", + "title": "Monitoraggio Energetico", "badges": [ - "sensor.potenza_istantanea", - "sensor.potenza_reattiva", - "sensor.tensione" + { + "entity": "sensor.shelly_em_channel_1_power" + }, + { + "entity": "sensor.shelly_em_channel_1_energy" + }, + { + "entity": "sensor.shelly_em_channel_1_voltage" + } ], "cards": [ { "detail": 2, - "entity": "sensor.potenza_istantanea", + "entity": "sensor.shelly_em_channel_1_power", "graph": "line", "name": "Consumo Energetico", "type": "sensor", "unit": "W" }, { - "entity": "sensor.potenza_istantanea", + "entity": "sensor.shelly_em_channel_1_power", "max": 4000, "min": 0, "name": "Potenza Istantanea", @@ -1258,10 +1337,7 @@ "title": "Consumi", "type": "entities" } - ], - "icon": "mdi:flash", - "id": "power", - "title": "Monitoraggio Energetico" + ] }, { "badges": [ diff --git a/.storage/lovelace_resources b/.storage/lovelace_resources index 2f027644..4e6aeae3 100644 --- a/.storage/lovelace_resources +++ b/.storage/lovelace_resources @@ -26,7 +26,7 @@ { "id": "6c8988516c824aa99cbd556a0b4ff39c", "type": "module", - "url": "/hacsfiles/lovelace-layout-card/layout-card.js" + "url": "/hacsfiles/lovelace-layout-card/layout-card.js?hacstag=156434866230" }, { "id": "b28e5c5a648145f0828a10f89b1b7770", @@ -39,7 +39,7 @@ "id": "74408ca439a142a1838d883c03a0142c" }, { - "url": "/hacsfiles/lovelace-swipe-navigation/swipe-navigation.js", + "url": "/hacsfiles/lovelace-swipe-navigation/swipe-navigation.js?hacstag=183995552136", "type": "module", "id": "737d0af49e4a49c881d60ef2c724203a" }, @@ -47,6 +47,11 @@ "url": "/hacsfiles/lovelace-card-mod/card-mod.js", "type": "module", "id": "1235e3ac5c7348f19284d47961cc2109" + }, + { + "url": "/hacsfiles/mini-graph-card/mini-graph-card-bundle.js", + "type": "module", + "id": "e4685ccd929f4e71a561d0d397f8ae80" } ] } diff --git a/automations/energy.yaml b/automations/energy.yaml index a96bb25f..2d2ad38a 100644 --- a/automations/energy.yaml +++ b/automations/energy.yaml @@ -6,13 +6,13 @@ trigger: - platform: numeric_state - entity_id: sensor.potenza_istantanea + entity_id: sensor.shelly_em_channel_1_power above: 2950 action: service: script.notify_all data_template: title: "Home Assistant - Allarme Consumo Energetico" - message: "Consumo energetico elevato ({{ states.sensor.potenza_istantanea.state }})." + message: "Consumo energetico elevato ({{ states.ssensor.shelly_em_channel_1_power.state }})." enable_persistent: 0 volume_level: 0.4 diff --git a/cover/camera.yaml b/cover/camera.yaml deleted file mode 100644 index df7720e5..00000000 --- a/cover/camera.yaml +++ /dev/null @@ -1,17 +0,0 @@ -###################################################################### -# Bedroom Cover -###################################################################### - -- platform: mqtt - name: Tapparella Camera - command_topic: "shellies/shellyswitch-559C49/roller/0/command" - position_topic: "shellies/shellyswitch-559C49/roller/0/pos" - set_position_topic: "shellies/shellyswitch-559C49/roller/0/command/pos" - payload_open: "open" - payload_close: "close" - payload_stop: "stop" - position_open: 100 - position_closed: 0 - retain: false - optimistic: false - qos: 0 diff --git a/cover/cucina.yaml b/cover/cucina.yaml deleted file mode 100644 index c929712b..00000000 --- a/cover/cucina.yaml +++ /dev/null @@ -1,17 +0,0 @@ -###################################################################### -# Kitchen Cover -###################################################################### - -- platform: mqtt - name: Tapparella Cucina - command_topic: "shellies/shellyswitch-55980F/roller/0/command" - position_topic: "shellies/shellyswitch-55980F/roller/0/pos" - set_position_topic: "shellies/shellyswitch-55980F/roller/0/command/pos" - payload_open: "open" - payload_close: "close" - payload_stop: "stop" - position_open: 100 - position_closed: 0 - retain: false - optimistic: false - qos: 0 diff --git a/cover/sala.yaml b/cover/sala.yaml deleted file mode 100644 index ddb988d3..00000000 --- a/cover/sala.yaml +++ /dev/null @@ -1,17 +0,0 @@ -###################################################################### -# Living Room Cover -###################################################################### - -- platform: mqtt - name: Tapparella Sala - command_topic: "shellies/shellyswitch25-6919BD/roller/0/command" - position_topic: "shellies/shellyswitch25-6919BD/roller/0/pos" - set_position_topic: "shellies/shellyswitch25-6919BD/roller/0/command/pos" - payload_open: "open" - payload_close: "close" - payload_stop: "stop" - position_open: 100 - position_closed: 0 - retain: false - optimistic: false - qos: 0 diff --git a/cover/studio.yaml b/cover/studio.yaml deleted file mode 100644 index a82a9249..00000000 --- a/cover/studio.yaml +++ /dev/null @@ -1,17 +0,0 @@ -###################################################################### -# Office Cover -###################################################################### - -- platform: mqtt - name: Tapparella Studio - command_topic: "shellies/shellyswitch-13572B/roller/0/command" - position_topic: "shellies/shellyswitch-13572B/roller/0/pos" - set_position_topic: "shellies/shellyswitch-13572B/roller/0/command/pos" - payload_open: "open" - payload_close: "close" - payload_stop: "stop" - position_open: 100 - position_closed: 0 - retain: false - optimistic: false - qos: 0 diff --git a/light/bagno.yaml b/light/bagno.yaml index 0801297d..728669f8 100644 --- a/light/bagno.yaml +++ b/light/bagno.yaml @@ -1,31 +1,3 @@ -###################################################################### -# Bathroom Light -###################################################################### - -- platform: mqtt - name: Luce Bagno - command_topic: "shellies/shellyswitch25-7457D8/relay/0/command" - state_topic: "shellies/shellyswitch25-7457D8/relay/0" - payload_on: "on" - payload_off: "off" - retain: false - qos: 0 - optimistic: false - -###################################################################### -# Bathroom Mirror Light -###################################################################### - -- platform: mqtt - name: Luce Specchio - command_topic: "shellies/shellyswitch25-7457D8/relay/1/command" - state_topic: "shellies/shellyswitch25-7457D8/relay/1" - payload_on: "on" - payload_off: "off" - retain: false - qos: 0 - optimistic: false - ###################################################################### # Bathroom Global ###################################################################### diff --git a/light/balcone.yaml b/light/balcone.yaml deleted file mode 100644 index a503f31a..00000000 --- a/light/balcone.yaml +++ /dev/null @@ -1,13 +0,0 @@ -###################################################################### -# 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 diff --git a/light/camera.yaml b/light/camera.yaml deleted file mode 100644 index b030c662..00000000 --- a/light/camera.yaml +++ /dev/null @@ -1,26 +0,0 @@ -###################################################################### -# Bedroom Light -###################################################################### - -- platform: mqtt - schema: template - name: Luce Camera - state_topic: "shellies/shellydimmer-D46CF2/light/0/status" - state_template: > - {% if value_json.ison %} - on - {% else %} - off - {% endif %} - command_topic: "shellies/shellydimmer-D46CF2/light/0/set" - command_on_template: > - {"turn": "on" - {% if brightness is defined %} - , "brightness": {{ brightness | float | multiply(0.3922) | round(0) }} - {% endif %} - } - command_off_template: '{ "turn" : "off" }' - brightness_template: "{{ value_json.brightness | float | multiply(2.55) | round(0) }}" - retain: false - qos: 0 - optimistic: false diff --git a/light/corridoio.yaml b/light/corridoio.yaml deleted file mode 100644 index 44456444..00000000 --- a/light/corridoio.yaml +++ /dev/null @@ -1,13 +0,0 @@ -###################################################################### -# Corridor Light -###################################################################### - -- platform: mqtt - name: Luce Corridoio - command_topic: "shellies/shelly1-24D1EE/relay/0/command" - state_topic: "shellies/shelly1-24D1EE/relay/0" - payload_on: "on" - payload_off: "off" - retain: false - qos: 0 - optimistic: false diff --git a/light/cucina.yaml b/light/cucina.yaml deleted file mode 100644 index 7938a241..00000000 --- a/light/cucina.yaml +++ /dev/null @@ -1,13 +0,0 @@ -###################################################################### -# Kitchen Light -###################################################################### - -- platform: mqtt - name: Luce Cucina - command_topic: "shellies/shelly1-93B27D/relay/0/command" - state_topic: "shellies/shelly1-93B27D/relay/0" - payload_on: "on" - payload_off: "off" - retain: false - qos: 0 - optimistic: false diff --git a/light/sala.yaml b/light/sala.yaml index e3470409..3b834b56 100644 --- a/light/sala.yaml +++ b/light/sala.yaml @@ -1,30 +1,3 @@ -###################################################################### -# Living Room Light -###################################################################### - -- platform: mqtt - schema: template - name: Luce Sala - state_topic: "shellies/shellydimmer-D3EA58/light/0/status" - state_template: > - {% if value_json.ison %} - on - {% else %} - off - {% endif %} - command_topic: "shellies/shellydimmer-D3EA58/light/0/set" - command_on_template: > - {"turn": "on" - {% if brightness is defined %} - , "brightness": {{ brightness | float | multiply(0.3922) | round(0) }} - {% endif %} - } - command_off_template: '{ "turn" : "off" }' - brightness_template: "{{ value_json.brightness | float | multiply(2.55) | round(0) }}" - retain: false - qos: 0 - optimistic: false - ###################################################################### # Living Room Couch Light (Color) ###################################################################### diff --git a/light/studio.yaml b/light/studio.yaml deleted file mode 100644 index 01b309e5..00000000 --- a/light/studio.yaml +++ /dev/null @@ -1,13 +0,0 @@ -###################################################################### -# Office Light -###################################################################### - -- platform: mqtt - name: Luce Studio - command_topic: "shellies/shelly1-59E18C/relay/0/command" - state_topic: "shellies/shelly1-59E18C/relay/0" - payload_on: "on" - payload_off: "off" - retain: false - qos: 0 - optimistic: false diff --git a/log/history.yaml b/log/history.yaml index 8480c422..b9b73162 100644 --- a/log/history.yaml +++ b/log/history.yaml @@ -28,9 +28,6 @@ exclude: - sensor.cert_expiry_server_giorgioravera_it - sensor.cert_expiry_timestamp_server_giorgioravera_it # Energy Sensors - - sensor.potenza_reattiva - - sensor.tensione - - sensor.consumo_energetico - sensor.consumo_energetico_giornaliero - sensor.consumo_energetico_mensile # Zigbee2mqtt diff --git a/log/logbook.yaml b/log/logbook.yaml index 78acd324..c3f8a941 100644 --- a/log/logbook.yaml +++ b/log/logbook.yaml @@ -28,9 +28,6 @@ exclude: - sensor.cert_expiry_server_giorgioravera_it - sensor.cert_expiry_timestamp_server_giorgioravera_it # Energy Sensors - - sensor.potenza_reattiva - - sensor.tensione - - sensor.consumo_energetico - sensor.consumo_energetico_giornaliero - sensor.consumo_energetico_mensile # Zigbee2mqtt diff --git a/log/recorder.yaml b/log/recorder.yaml index 8c20a79e..46273039 100644 --- a/log/recorder.yaml +++ b/log/recorder.yaml @@ -30,9 +30,6 @@ exclude: - sensor.cert_expiry_server_giorgioravera_it - sensor.cert_expiry_timestamp_server_giorgioravera_it # Energy Sensors - - sensor.potenza_reattiva - - sensor.tensione - - sensor.consumo_energetico - sensor.consumo_energetico_giornaliero - sensor.consumo_energetico_mensile # Zigbee2mqtt diff --git a/packages/shelly/shelly_customizations.yaml b/packages/shelly/shelly_customizations.yaml index fff77469..674b34f8 100644 --- a/packages/shelly/shelly_customizations.yaml +++ b/packages/shelly/shelly_customizations.yaml @@ -6,6 +6,235 @@ homeassistant: customize: script.shelly_upgrade: icon: mdi:cellphone-arrow-down - script.shelly_reboot: icon: mdi:restart + + # Shelly 1 - Tapparella Cucina (shellyswitch_55980f) + sensor.tapparella_cucina_energy: + friendly_name: Tapparella Cucina - Energia + sensor.tapparella_cucina_power: + friendly_name: Tapparella Cucina - Potenza + binary_sensor.tapparella_cucina_channel_1_input: + friendly_name: Tapparella Cucina - Pulsante 1 + binary_sensor.tapparella_cucina_channel_2_input: + friendly_name: Tapparella Cucina - Pulsante 2 + binary_sensor.tapparella_cucina_cloud: + friendly_name: Tapparella Cucina - Connessione Cloud + binary_sensor.tapparella_cucina_firmware_update: + friendly_name: Tapparella Cucina - Aggiornamento Firmware + sensor.tapparella_cucina_rssi: + friendly_name: Tapparella Cucina - Potenza Segnale + sensor.tapparella_cucina_uptime: + friendly_name: Tapparella Cucina - Uptime + + # Shelly 2 - Tapparella Sala (shellyswitch25_6919bd) + sensor.tapparella_sala_energy: + friendly_name: Tapparella Sala - Energia + sensor.tapparella_sala_power: + friendly_name: Tapparella Sala - Potenza + binary_sensor.tapparella_sala_channel_1_input: + friendly_name: Tapparella Sala - Pulsante 1 + binary_sensor.tapparella_sala_channel_2_input: + friendly_name: Tapparella Sala - Pulsante 2 + binary_sensor.tapparella_sala_cloud: + friendly_name: Tapparella Sala - Connessione Cloud + sensor.tapparella_sala_device_temperature: + friendly_name: Tapparella Sala - Temperatura Device + binary_sensor.tapparella_sala_overheating: + friendly_name: Tapparella Sala - Surriscaldamento Device + binary_sensor.tapparella_sala_firmware_update: + friendly_name: Tapparella Sala - Aggiornamento Firmware + sensor.tapparella_sala_rssi: + friendly_name: Tapparella Sala - Potenza Segnale + sensor.tapparella_sala_uptime: + friendly_name: Tapparella Sala - Uptime + + # Shelly 3 - Tapparella Studio (shellyswitch_13572b) + sensor.tapparella_studio_energy: + friendly_name: Tapparella Studio - Energia + sensor.tapparella_studio_power: + friendly_name: Tapparella Studio - Potenza + binary_sensor.tapparella_studio_channel_1_input: + friendly_name: Tapparella Studio - Pulsante 1 + binary_sensor.tapparella_studio_channel_2_input: + friendly_name: Tapparella Studio - Pulsante 2 + binary_sensor.tapparella_studio_cloud: + friendly_name: Tapparella Studio - Connessione Cloud + binary_sensor.tapparella_studio_firmware_update: + friendly_name: Tapparella Studio - Aggiornamento Firmware + sensor.tapparella_studio_rssi: + friendly_name: Tapparella Studio - Potenza Segnale + sensor.tapparella_studio_uptime: + friendly_name: Tapparella Studio - Uptime + + # Shelly 4 - Tapparella Camera (shellyswitch_559c49) + sensor.tapparella_camera_energy: + friendly_name: Tapparella Camera - Energia + sensor.tapparella_camera_power: + friendly_name: Tapparella Camera - Potenza + binary_sensor.tapparella_camera_channel_1_input: + friendly_name: Tapparella Camera - Pulsante 1 + binary_sensor.tapparella_camera_channel_2_input: + friendly_name: Tapparella Camera - Pulsante 2 + binary_sensor.tapparella_camera_cloud: + friendly_name: Tapparella Camera - Connessione Cloud + binary_sensor.tapparella_camera_firmware_update: + friendly_name: Tapparella Camera - Aggiornamento Firmware + sensor.tapparella_camera_rssi: + friendly_name: Tapparella Camera - Potenza Segnale + sensor.tapparella_camera_uptime: + friendly_name: Tapparella Camera - Uptime + + # Shelly 5 - Luce Corridoio (shelly1_24d1ee) + binary_sensor.luce_corridoio_cloud: + friendly_name: Luce Corridoio - Connessione Cloud + binary_sensor.luce_corridoio_firmware_update: + friendly_name: Luce Corridoio - Aggiornamento Firmware + sensor.luce_corridoio_rssi: + friendly_name: Luce Corridoio - Potenza Segnale + sensor.luce_corridoio_uptime: + friendly_name: Luce Corridoio - Uptime + + # Shelly 6 - Luce Cucina (shelly1_93B27D) + binary_sensor.luce_cucina_cloud: + friendly_name: Luce Cucina - Connessione Cloud + binary_sensor.luce_cucina_firmware_update: + friendly_name: Luce Cucina - Aggiornamento Firmware + sensor.luce_cucina_rssi: + friendly_name: Luce Cucina - Potenza Segnale + sensor.luce_cucina_uptime: + friendly_name: Luce Cucina - Uptime + + # Shelly 7 - Luce Sala (shellydimmer_d3ea58) + binary_sensor.luce_sala_channel_1_input: + friendly_name: Luce Sala - Pulsante 1 + binary_sensor.luce_sala_channel_2_input: + friendly_name: Luce Sala - Pulsante 2 + sensor.luce_sala_energy: + friendly_name: Luci Sala - Energia + sensor.luce_sala_power: + friendly_name: Luci Sala - Potenza + binary_sensor.luce_sala_overpowering: + friendly_name: Luci Sala - Sovraccarico Energetico + binary_sensor.luce_sala_cloud: + friendly_name: Luce Sala - Connessione Cloud + sensor.luce_sala_device_temperature: + friendly_name: Luci Sala - Temperatura Device + binary_sensor.luce_sala_overheating: + friendly_name: Luci Sala - Surriscaldamento Device + binary_sensor.luce_sala_firmware_update: + friendly_name: Luce Sala - Aggiornamento Firmware + sensor.luce_sala_rssi: + friendly_name: Luce Sala - Potenza Segnale + sensor.luce_sala_uptime: + friendly_name: Luce Sala - Uptime + + # Shelly 8 - Luci Bagno (shellyswitch25_7457d8) + sensor.luci_bagno_channel_1_energy: + friendly_name: Luci Bagno - Energia Canale 1 + binary_sensor.luci_bagno_channel_1_overpowering: + friendly_name: Luci Bagno - Sovraccarico Energetico Canale 1 + sensor.luci_bagno_channel_1_power: + friendly_name: Luci Bagno - Potenza Canale 1 + sensor.luci_bagno_channel_2_energy: + friendly_name: Luci Bagno - Energia Canale 2 + binary_sensor.luci_bagno_channel_2_overpowering: + friendly_name: Luci Bagno - Sovraccarico Energetico Canale 2 + sensor.luci_bagno_channel_2_power: + friendly_name: Luci Bagno - Potenza Canale 2 + binary_sensor.luci_bagno_cloud: + friendly_name: Luci Bagno - Connessione Cloud + sensor.luci_bagno_device_temperature: + friendly_name: Luci Bagno - Temperatura Device + binary_sensor.luci_bagno_overheating: + friendly_name: Luci Bagno - Surriscaldamento Device + binary_sensor.luci_bagno_firmware_update: + friendly_name: Luci Bagno - Aggiornamento Firmware + sensor.luci_bagno_rssi: + friendly_name: Luci Bagno - Potenza Segnale + sensor.luci_bagno_uptime: + friendly_name: Luci Bagno - Uptime + + # Shelly 9 - Luce Studio (shelly1_59e18c) + binary_sensor.luce_studio_cloud: + friendly_name: Luce Studio - Connessione Cloud + binary_sensor.luce_studio_firmware_update: + friendly_name: Luce Studio - Aggiornamento Firmware + sensor.luce_studio_rssi: + friendly_name: Luce Studio - Potenza Segnale + sensor.luce_studio_uptime: + friendly_name: Luce Studio - Uptime + + # Shelly 10 - Luce Camera (shellydimmer_d46cf2) + binary_sensor.luce_camera_channel_1_input: + friendly_name: Luce Camera - Pulsante 1 + binary_sensor.luce_camera_channel_2_input: + friendly_name: Luce Camera - Pulsante 2 + sensor.luce_camera_energy: + friendly_name: Luci Camera - Energia + sensor.luce_camera_power: + friendly_name: Luci Camera - Potenza + binary_sensor.luce_camera_overpowering: + friendly_name: Luci Camera - Sovraccarico Energetico + binary_sensor.luce_camera_cloud: + friendly_name: Luce Camera - Connessione Cloud + sensor.luce_camera_device_temperature: + friendly_name: Luci Camera - Temperatura Device + binary_sensor.luce_camera_overheating: + friendly_name: Luci Camera - Surriscaldamento Device + binary_sensor.luce_camera_firmware_update: + friendly_name: Luce Camera - Aggiornamento Firmware + sensor.luce_camera_rssi: + friendly_name: Luce Camera - Potenza Segnale + sensor.luce_camera_uptime: + friendly_name: Luce Camera - Uptime + + # Shelly 11 - Luce Balcone (shelly1_c423c8) + binary_sensor.luce_balcone_cloud: + friendly_name: Luce Balcone - Connessione Cloud + binary_sensor.luce_balcone_firmware_update: + friendly_name: Luce Balcone - Aggiornamento Firmware + sensor.luce_balcone_rssi: + friendly_name: Luce Balcone - Potenza Segnale + sensor.luce_balcone_uptime: + friendly_name: Luce Balcone - Uptime + + # Shelly EM (shellyem_b9e1a0) + switch.shelly_em: + friendly_name: Shelly EM - 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_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 + binary_sensor.shelly_em_overpowering: + friendly_name: Shelly EM - Sovraccarico Energetico + binary_sensor.shelly_em_cloud: + friendly_name: Shelly EM - Connessione Cloud + binary_sensor.shelly_em_firmware_update: + friendly_name: Shelly EM - Aggiornamento Firmware + sensor.shelly_em_rssi: + friendly_name: Shelly EM - Potenza Segnale + sensor.shelly_em_uptime: + friendly_name: Shelly EM - Uptime + + # Shelly Bulb (shellybulb_bc8610) + binary_sensor.luce_divano_cloud: + friendly_name: Luce Divano - Connessione Cloud + binary_sensor.luce_divano_firmware_update: + friendly_name: Luce Divano - Aggiornamento Firmware + sensor.luce_divano_rssi: + friendly_name: Luce Divano - Potenza Segnale + sensor.luce_divano_uptime: + friendly_name: Luce Divano - Uptime diff --git a/packages/shelly/shelly_log.yaml b/packages/shelly/shelly_log.yaml index 652726e4..66f345bc 100644 --- a/packages/shelly/shelly_log.yaml +++ b/packages/shelly/shelly_log.yaml @@ -19,6 +19,121 @@ history: - sensor.shellybulb - sensor.shellyem - sensor.shellyplugs + # Shelly 1 - Tapparella Cucina (shellyswitch_55980f) + - sensor.tapparella_cucina_energy + - sensor.tapparella_cucina_power + - binary_sensor.tapparella_cucina_channel_1_input + - binary_sensor.tapparella_cucina_channel_2_input + - binary_sensor.tapparella_cucina_cloud + - binary_sensor.tapparella_cucina_firmware_update + - sensor.tapparella_cucina_rssi + - sensor.tapparella_cucina_uptime + # Shelly 2 - Tapparella Sala (shellyswitch25_6919bd) + - sensor.tapparella_sala_energy + - sensor.tapparella_sala_power + - binary_sensor.tapparella_sala_channel_1_input + - binary_sensor.tapparella_sala_channel_2_input + - binary_sensor.tapparella_sala_cloud + - sensor.tapparella_sala_device_temperature + - binary_sensor.tapparella_sala_overheating + - binary_sensor.tapparella_sala_firmware_update + - sensor.tapparella_sala_rssi + - sensor.tapparella_sala_uptime + # Shelly 3 - Tapparella Studio (shellyswitch_13572b) + - sensor.tapparella_studio_energy + - sensor.tapparella_studio_power + - binary_sensor.tapparella_studio_channel_1_input + - binary_sensor.tapparella_studio_channel_2_input + - binary_sensor.tapparella_studio_cloud + - binary_sensor.tapparella_studio_firmware_update + - sensor.tapparella_studio_rssi + - sensor.tapparella_studio_uptime + # Shelly 4 - Tapparella Camera (shellyswitch_559c49) + - sensor.tapparella_camera_energy + - sensor.tapparella_camera_power + - binary_sensor.tapparella_camera_channel_1_input + - binary_sensor.tapparella_camera_channel_2_input + - binary_sensor.tapparella_camera_cloud + - binary_sensor.tapparella_camera_firmware_update + - sensor.tapparella_camera_rssi + - sensor.tapparella_camera_uptime + # Shelly 5 - Luce Corridoio (shelly1_24d1ee) + - binary_sensor.luce_corridoio_cloud + - binary_sensor.luce_corridoio_firmware_update + - sensor.luce_corridoio_rssi + - sensor.luce_corridoio_uptime + # Shelly 6 - Luce Cucina (shelly1_93B27D) + - binary_sensor.luce_cucina_cloud + - binary_sensor.luce_cucina_firmware_update + - sensor.luce_cucina_rssi + - sensor.luce_cucina_uptime + # Shelly 7 - Luce Sala (shellydimmer_d3ea58) + - binary_sensor.luce_sala_channel_1_input + - binary_sensor.luce_sala_channel_2_input + - sensor.luce_sala_energy + - sensor.luce_sala_power + - binary_sensor.luce_sala_overpowering + - binary_sensor.luce_sala_cloud + - sensor.luce_sala_device_temperature + - binary_sensor.luce_sala_overheating + - binary_sensor.luce_sala_firmware_update + - sensor.luce_sala_rssi + - sensor.luce_sala_uptime + # Shelly 8 - Luci Bagno (shellyswitch25_7457d8) + - sensor.luci_bagno_channel_1_energy + - binary_sensor.luci_bagno_channel_1_overpowering + - sensor.luci_bagno_channel_1_power + - sensor.luci_bagno_channel_2_energy + - binary_sensor.luci_bagno_channel_2_overpowering + - sensor.luci_bagno_channel_2_power + - binary_sensor.luci_bagno_cloud + - sensor.luci_bagno_device_temperature + - binary_sensor.luci_bagno_overheating + - binary_sensor.luci_bagno_firmware_update + - sensor.luci_bagno_rssi + - sensor.luci_bagno_uptime + # Shelly 9 - Luce Studio (shelly1_59e18c) + - binary_sensor.luce_studio_cloud + - binary_sensor.luce_studio_firmware_update + - sensor.luce_studio_rssi + - sensor.luce_studio_uptime + # Shelly 10 - Luce Camera (shellydimmer_d46cf2) + - binary_sensor.luce_camera_channel_1_input + - binary_sensor.luce_camera_channel_2_input + - sensor.luce_camera_energy + - sensor.luce_camera_power + - binary_sensor.luce_camera_overpowering + - binary_sensor.luce_camera_cloud + - sensor.luce_camera_device_temperature + - binary_sensor.luce_camera_overheating + - binary_sensor.luce_camera_firmware_update + - sensor.luce_camera_rssi + - sensor.luce_camera_uptime + # Shelly 11 - Luce Balcone (shelly1_c423c8) + - binary_sensor.luce_balcone_cloud + - binary_sensor.luce_balcone_firmware_update + - sensor.luce_balcone_rssi + - sensor.luce_balcone_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_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 + - binary_sensor.shelly_em_overpowering + - binary_sensor.shelly_em_cloud + - binary_sensor.shelly_em_firmware_update + - sensor.shelly_em_rssi + - sensor.shelly_em_uptime + # Shelly Bulb (shellybulb_bc8610) + - binary_sensor.luce_divano_cloud + - binary_sensor.luce_divano_firmware_update + - sensor.luce_divano_rssi + - sensor.luce_divano_uptime ###################################################################### # Shelly Package - Logbook @@ -41,6 +156,121 @@ logbook: - sensor.shellybulb - sensor.shellyem - sensor.shellyplugs + # Shelly 1 - Tapparella Cucina (shellyswitch_55980f) + - sensor.tapparella_cucina_energy + - sensor.tapparella_cucina_power + - binary_sensor.tapparella_cucina_channel_1_input + - binary_sensor.tapparella_cucina_channel_2_input + - binary_sensor.tapparella_cucina_cloud + - binary_sensor.tapparella_cucina_firmware_update + - sensor.tapparella_cucina_rssi + - sensor.tapparella_cucina_uptime + # Shelly 2 - Tapparella Sala (shellyswitch25_6919bd) + - sensor.tapparella_sala_energy + - sensor.tapparella_sala_power + - binary_sensor.tapparella_sala_channel_1_input + - binary_sensor.tapparella_sala_channel_2_input + - binary_sensor.tapparella_sala_cloud + - sensor.tapparella_sala_device_temperature + - binary_sensor.tapparella_sala_overheating + - binary_sensor.tapparella_sala_firmware_update + - sensor.tapparella_sala_rssi + - sensor.tapparella_sala_uptime + # Shelly 3 - Tapparella Studio (shellyswitch_13572b) + - sensor.tapparella_studio_energy + - sensor.tapparella_studio_power + - binary_sensor.tapparella_studio_channel_1_input + - binary_sensor.tapparella_studio_channel_2_input + - binary_sensor.tapparella_studio_cloud + - binary_sensor.tapparella_studio_firmware_update + - sensor.tapparella_studio_rssi + - sensor.tapparella_studio_uptime + # Shelly 4 - Tapparella Camera (shellyswitch_559c49) + - sensor.tapparella_camera_energy + - sensor.tapparella_camera_power + - binary_sensor.tapparella_camera_channel_1_input + - binary_sensor.tapparella_camera_channel_2_input + - binary_sensor.tapparella_camera_cloud + - binary_sensor.tapparella_camera_firmware_update + - sensor.tapparella_camera_rssi + - sensor.tapparella_camera_uptime + # Shelly 5 - Luce Corridoio (shelly1_24d1ee) + - binary_sensor.luce_corridoio_cloud + - binary_sensor.luce_corridoio_firmware_update + - sensor.luce_corridoio_rssi + - sensor.luce_corridoio_uptime + # Shelly 6 - Luce Cucina (shelly1_93B27D) + - binary_sensor.luce_cucina_cloud + - binary_sensor.luce_cucina_firmware_update + - sensor.luce_cucina_rssi + - sensor.luce_cucina_uptime + # Shelly 7 - Luce Sala (shellydimmer_d3ea58) + - binary_sensor.luce_sala_channel_1_input + - binary_sensor.luce_sala_channel_2_input + - sensor.luce_sala_energy + - sensor.luce_sala_power + - binary_sensor.luce_sala_overpowering + - binary_sensor.luce_sala_cloud + - sensor.luce_sala_device_temperature + - binary_sensor.luce_sala_overheating + - binary_sensor.luce_sala_firmware_update + - sensor.luce_sala_rssi + - sensor.luce_sala_uptime + # Shelly 8 - Luci Bagno (shellyswitch25_7457d8) + - sensor.luci_bagno_channel_1_energy + - binary_sensor.luci_bagno_channel_1_overpowering + - sensor.luci_bagno_channel_1_power + - sensor.luci_bagno_channel_2_energy + - binary_sensor.luci_bagno_channel_2_overpowering + - sensor.luci_bagno_channel_2_power + - binary_sensor.luci_bagno_cloud + - sensor.luci_bagno_device_temperature + - binary_sensor.luci_bagno_overheating + - binary_sensor.luci_bagno_firmware_update + - sensor.luci_bagno_rssi + - sensor.luci_bagno_uptime + # Shelly 9 - Luce Studio (shelly1_59e18c) + - binary_sensor.luce_studio_cloud + - binary_sensor.luce_studio_firmware_update + - sensor.luce_studio_rssi + - sensor.luce_studio_uptime + # Shelly 10 - Luce Camera (shellydimmer_d46cf2) + - binary_sensor.luce_camera_channel_1_input + - binary_sensor.luce_camera_channel_2_input + - sensor.luce_camera_energy + - sensor.luce_camera_power + - binary_sensor.luce_camera_overpowering + - binary_sensor.luce_camera_cloud + - sensor.luce_camera_device_temperature + - binary_sensor.luce_camera_overheating + - binary_sensor.luce_camera_firmware_update + - sensor.luce_camera_rssi + - sensor.luce_camera_uptime + # Shelly 11 - Luce Balcone (shelly1_c423c8) + - binary_sensor.luce_balcone_cloud + - binary_sensor.luce_balcone_firmware_update + - sensor.luce_balcone_rssi + - sensor.luce_balcone_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_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 + - binary_sensor.shelly_em_overpowering + - binary_sensor.shelly_em_cloud + - binary_sensor.shelly_em_firmware_update + - sensor.shelly_em_rssi + - sensor.shelly_em_uptime + # Shelly Bulb (shellybulb_bc8610) + - binary_sensor.luce_divano_cloud + - binary_sensor.luce_divano_firmware_update + - sensor.luce_divano_rssi + - sensor.luce_divano_uptime ###################################################################### # Shelly Package - Recorder @@ -63,3 +293,118 @@ recorder: - sensor.shellybulb - sensor.shellyem - sensor.shellyplugs + # Shelly 1 - Tapparella Cucina (shellyswitch_55980f) + - sensor.tapparella_cucina_energy + - sensor.tapparella_cucina_power + - binary_sensor.tapparella_cucina_channel_1_input + - binary_sensor.tapparella_cucina_channel_2_input + - binary_sensor.tapparella_cucina_cloud + - binary_sensor.tapparella_cucina_firmware_update + - sensor.tapparella_cucina_rssi + - sensor.tapparella_cucina_uptime + # Shelly 2 - Tapparella Sala (shellyswitch25_6919bd) + - sensor.tapparella_sala_energy + - sensor.tapparella_sala_power + - binary_sensor.tapparella_sala_channel_1_input + - binary_sensor.tapparella_sala_channel_2_input + - binary_sensor.tapparella_sala_cloud + - sensor.tapparella_sala_device_temperature + - binary_sensor.tapparella_sala_overheating + - binary_sensor.tapparella_sala_firmware_update + - sensor.tapparella_sala_rssi + - sensor.tapparella_sala_uptime + # Shelly 3 - Tapparella Studio (shellyswitch_13572b) + - sensor.tapparella_studio_energy + - sensor.tapparella_studio_power + - binary_sensor.tapparella_studio_channel_1_input + - binary_sensor.tapparella_studio_channel_2_input + - binary_sensor.tapparella_studio_cloud + - binary_sensor.tapparella_studio_firmware_update + - sensor.tapparella_studio_rssi + - sensor.tapparella_studio_uptime + # Shelly 4 - Tapparella Camera (shellyswitch_559c49) + - sensor.tapparella_camera_energy + - sensor.tapparella_camera_power + - binary_sensor.tapparella_camera_channel_1_input + - binary_sensor.tapparella_camera_channel_2_input + - binary_sensor.tapparella_camera_cloud + - binary_sensor.tapparella_camera_firmware_update + - sensor.tapparella_camera_rssi + - sensor.tapparella_camera_uptime + # Shelly 5 - Luce Corridoio (shelly1_24d1ee) + - binary_sensor.luce_corridoio_cloud + - binary_sensor.luce_corridoio_firmware_update + - sensor.luce_corridoio_rssi + - sensor.luce_corridoio_uptime + # Shelly 6 - Luce Cucina (shelly1_93B27D) + - binary_sensor.luce_cucina_cloud + - binary_sensor.luce_cucina_firmware_update + - sensor.luce_cucina_rssi + - sensor.luce_cucina_uptime + # Shelly 7 - Luce Sala (shellydimmer_d3ea58) + - binary_sensor.luce_sala_channel_1_input + - binary_sensor.luce_sala_channel_2_input + - sensor.luce_sala_energy + - sensor.luce_sala_power + - binary_sensor.luce_sala_overpowering + - binary_sensor.luce_sala_cloud + - sensor.luce_sala_device_temperature + - binary_sensor.luce_sala_overheating + - binary_sensor.luce_sala_firmware_update + - sensor.luce_sala_rssi + - sensor.luce_sala_uptime + # Shelly 8 - Luci Bagno (shellyswitch25_7457d8) + - sensor.luci_bagno_channel_1_energy + - binary_sensor.luci_bagno_channel_1_overpowering + - sensor.luci_bagno_channel_1_power + - sensor.luci_bagno_channel_2_energy + - binary_sensor.luci_bagno_channel_2_overpowering + - sensor.luci_bagno_channel_2_power + - binary_sensor.luci_bagno_cloud + - sensor.luci_bagno_device_temperature + - binary_sensor.luci_bagno_overheating + - binary_sensor.luci_bagno_firmware_update + - sensor.luci_bagno_rssi + - sensor.luci_bagno_uptime + # Shelly 9 - Luce Studio (shelly1_59e18c) + - binary_sensor.luce_studio_cloud + - binary_sensor.luce_studio_firmware_update + - sensor.luce_studio_rssi + - sensor.luce_studio_uptime + # Shelly 10 - Luce Camera (shellydimmer_d46cf2) + - binary_sensor.luce_camera_channel_1_input + - binary_sensor.luce_camera_channel_2_input + - sensor.luce_camera_energy + - sensor.luce_camera_power + - binary_sensor.luce_camera_overpowering + - binary_sensor.luce_camera_cloud + - sensor.luce_camera_device_temperature + - binary_sensor.luce_camera_overheating + - binary_sensor.luce_camera_firmware_update + - sensor.luce_camera_rssi + - sensor.luce_camera_uptime + # Shelly 11 - Luce Balcone (shelly1_c423c8) + - binary_sensor.luce_balcone_cloud + - binary_sensor.luce_balcone_firmware_update + - sensor.luce_balcone_rssi + - sensor.luce_balcone_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_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 + - binary_sensor.shelly_em_overpowering + - binary_sensor.shelly_em_cloud + - binary_sensor.shelly_em_firmware_update + - sensor.shelly_em_rssi + - sensor.shelly_em_uptime + # Shelly Bulb (shellybulb_bc8610) + - binary_sensor.luce_divano_cloud + - binary_sensor.luce_divano_firmware_update + - sensor.luce_divano_rssi + - sensor.luce_divano_uptime diff --git a/sensor/energy.yaml b/sensor/energy.yaml deleted file mode 100644 index 79e42e76..00000000 --- a/sensor/energy.yaml +++ /dev/null @@ -1,46 +0,0 @@ -###################################################################### -# Shelly EM -###################################################################### - -- platform: mqtt - name: "Potenza Istantanea" - state_topic: "shellies/shellyem-B9E1A0/emeter/0/power" - unit_of_measurement: 'W' - qos: 0 - device_class: power - -- platform: mqtt - name: "Potenza Reattiva" - state_topic: "shellies/shellyem-B9E1A0/emeter/0/reactive_power" - unit_of_measurement: 'W' - qos: 0 - device_class: power - -- platform: mqtt - name: "Tensione" - state_topic: "shellies/shellyem-B9E1A0/emeter/0/voltage" - unit_of_measurement: 'V' - qos: 0 - device_class: power - -#- platform: mqtt -# name: "Energia Assorbita" -# state_topic: "shellies/shellyem-B9E1A0/emeter/0/energy" -# unit_of_measurement: 'Watt/min' -# qos: 0 -# device_class: power - -- platform: mqtt - name: "Consumo Energetico" - state_topic: "shellies/shellyem-B9E1A0/emeter/0/total" - unit_of_measurement: 'kWh' - value_template: "{{ (( value|float )/(1000)) | round(2) }}" - qos: 0 - device_class: power - -#- platform: mqtt -# name: "Energia Restituita" -# state_topic: "shellies/shellyem-B9E1A0/emeter/0/returned_energy" -# unit_of_measurement: 'Watt/min' -# qos: 0 -# device_class: power diff --git a/templates/speech_message.yaml b/templates/speech_message.yaml index c562d801..61cdc301 100644 --- a/templates/speech_message.yaml +++ b/templates/speech_message.yaml @@ -114,7 +114,7 @@ {# Consumption Status #} {%- macro status_consumption() -%} - "Il consumo istantaneo è pari a {{ states.sensor.potenza_istantanea.state }} watt" + "Il consumo istantaneo è pari a {{ states.sensor.shelly_em_channel_1_power.state }} watt" {%- endmacro -%} {# Location Status #} diff --git a/utility_meter/energy.yaml b/utility_meter/energy.yaml index 893672e5..5967fe72 100644 --- a/utility_meter/energy.yaml +++ b/utility_meter/energy.yaml @@ -3,9 +3,9 @@ ###################################################################### consumo_energetico_giornaliero: - source: sensor.consumo_energetico + source: sensor.shelly_em_channel_1_energy cycle: daily consumo_energetico_mensile: - source: sensor.consumo_energetico + source: sensor.shelly_em_channel_1_energy cycle: monthly -- 2.47.3