From a5bd7242802c3e5108bdefde7bb7d97046fc0213 Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Sat, 14 Aug 2021 19:29:02 +0200 Subject: [PATCH] Updated lovelace view (shelly+sidebar) --- .storage/lovelace | 108 ++++++++++++++++++++--- .storage/lovelace.lovelace_dispositivi | 115 ++++++++++++++++++++++++- .storage/lovelace.lovelace_settings | 38 ++++---- 3 files changed, 228 insertions(+), 33 deletions(-) diff --git a/.storage/lovelace b/.storage/lovelace index 45ff3bc8..9dee909f 100644 --- a/.storage/lovelace +++ b/.storage/lovelace @@ -1292,6 +1292,7 @@ "icon": "mdi:flash", "id": "power", "title": "Monitoraggio Energetico", + "type": "sidebar", "badges": [ { "entity": "sensor.shelly_em_channel_1_power" @@ -1304,14 +1305,6 @@ } ], "cards": [ - { - "detail": 2, - "entity": "sensor.shelly_em_channel_1_power", - "graph": "line", - "name": "Consumo Energetico", - "type": "sensor", - "unit": "W" - }, { "entity": "sensor.shelly_em_channel_1_power", "max": 4000, @@ -1323,7 +1316,45 @@ "yellow": 2000 }, "type": "gauge", - "unit": "W" + "unit": "W", + "needle": true, + "view_layout": { + "position": "sidebar" + } + }, + { + "type": "gauge", + "entity": "sensor.consumo_energetico_giornaliero", + "min": 0, + "name": "Consumo Giornaliero", + "unit": "kWh", + "severity": { + "green": 0, + "yellow": 3, + "red": 5 + }, + "needle": true, + "max": 6, + "view_layout": { + "position": "sidebar" + } + }, + { + "type": "gauge", + "entity": "sensor.consumo_energetico_mensile", + "min": 0, + "max": 150, + "name": "Consumo Mensile", + "unit": "kWh", + "needle": true, + "severity": { + "green": 0, + "yellow": 100, + "red": 120 + }, + "view_layout": { + "position": "sidebar" + } }, { "entities": [ @@ -1335,7 +1366,21 @@ } ], "title": "Consumi", - "type": "entities" + "type": "entities", + "view_layout": { + "position": "sidebar" + } + }, + { + "type": "history-graph", + "entities": [ + { + "entity": "sensor.shelly_em_channel_1_power" + } + ], + "hours_to_show": 24, + "refresh_interval": 0, + "title": "Consumo Eenergetico" } ] }, @@ -1365,6 +1410,49 @@ "icon": "mdi:home-thermometer", "badges": [], "cards": [ + { + "type": "vertical-stack", + "cards": [ + { + "type": "custom:button-card", + "name": "Meteo", + "label": "Shelly", + "layout": "name_state", + "show_state": false, + "show_name": true, + "show_label": false, + "show_icon": false, + "show_entity_picture": false, + "styles": { + "card": [ + { + "background-color": "transparent" + }, + { + "box-shadow": "0px 0px 0px 0px." + } + ], + "entity_picture": [ + { + "width": "15%" + } + ] + }, + "view_layout": { + "grid-area": "header" + } + }, + { + "type": "weather-forecast", + "entity": "weather.meteo_savona", + "show_forecast": true + }, + { + "type": "weather-forecast", + "entity": "weather.meteo_morgex" + } + ] + }, { "type": "vertical-stack", "cards": [ diff --git a/.storage/lovelace.lovelace_dispositivi b/.storage/lovelace.lovelace_dispositivi index dc2b59b5..c64032eb 100644 --- a/.storage/lovelace.lovelace_dispositivi +++ b/.storage/lovelace.lovelace_dispositivi @@ -141,15 +141,15 @@ "sort_by_level": "desc", "entities": [ { - "entity": "sensor.main_door_battery", + "entity": "sensor.porta_casa_battery", "name": "Porta Casa" }, { - "entity": "sensor.front_balcony_battery", + "entity": "sensor.temperatura_balcone_battery", "name": "Temperatura Balcone" }, { - "entity": "sensor.rear_balcony_battery", + "entity": "sensor.temperatura_veranda_battery", "name": "Temperatura Veranda" }, { @@ -261,6 +261,115 @@ ] } ] + }, + { + "title": "Shelly", + "type": "sidebar", + "layout": { + "grid-template-columns": "auto auto auto", + "grid-template-rows": "auto", + "grid-template-areas": "\"header header header\"\n\"main1 main2 main3\"\n\"footer footer footer\"\n", + "mediaquery": { + "(max-width: 600px)": { + "grid-template-columns": "100%", + "grid-template-areas": "\"header\"\n\"main1\"\n\"main2\"\n\"main3\"\n\"footer\"\n" + }, + "(max-width: 800px)": { + "grid-template-columns": "50% 50%", + "grid-template-areas": "\"header header\"\n\"main1 main1\"\n\"main2 main3\"\n\"footer footer\"\n" + } + } + }, + "icon": "mdi:alpha-s-box", + "badges": [], + "cards": [ + { + "type": "custom:button-card", + "name": "Shelly", + "label": "Shelly", + "layout": "name_state", + "show_state": false, + "show_name": false, + "show_label": false, + "show_icon": false, + "show_entity_picture": true, + "entity_picture": "/local/images/devices/shelly_logo_black.png", + "styles": { + "card": [ + { + "background-color": "transparent" + }, + { + "box-shadow": "0px 0px 0px 0px." + } + ], + "entity_picture": [ + { + "width": "15%" + } + ] + }, + "view_layout": { + "grid-area": "header" + } + }, + { + "type": "entities", + "entities": [ + "script.shelly_upgrade", + "script.shelly_reboot" + ], + "title": "Operazioni sui dispositivi", + "view_layout": { + "grid-area": "main1" + } + }, + { + "type": "entities", + "entities": [ + { + "entity": "sensor.shelly1" + }, + { + "entity": "sensor.shelly2" + }, + { + "entity": "sensor.shelly3" + }, + { + "entity": "sensor.shelly4" + }, + { + "entity": "sensor.shelly5" + }, + { + "entity": "sensor.shelly6" + }, + { + "entity": "sensor.shelly7" + }, + { + "entity": "sensor.shelly8" + }, + { + "entity": "sensor.shelly9" + }, + { + "entity": "sensor.shelly10" + }, + { + "entity": "sensor.shelly11" + }, + { + "entity": "sensor.shellyem" + } + ], + "title": "Aggiornamenti Disponibili", + "view_layout": { + "position": "sidebar" + } + } + ] } ], "title": "Dispositivi" diff --git a/.storage/lovelace.lovelace_settings b/.storage/lovelace.lovelace_settings index 3a491b28..c750a773 100644 --- a/.storage/lovelace.lovelace_settings +++ b/.storage/lovelace.lovelace_settings @@ -68,15 +68,6 @@ "show_header_toggle": false, "title": "Controlli", "type": "entities" - }, - { - "entities": [ - "script.shelly_upgrade", - "script.shelly_reboot" - ], - "show_header_toggle": false, - "title": "Operazione sui Dispositivi", - "type": "entities" } ], "type": "vertical-stack" @@ -107,6 +98,9 @@ "title": "Configurazione" }, { + "icon": "mdi:lan", + "title": "Dispositivi di Rete", + "type": "sidebar", "badges": [], "cards": [ { @@ -115,13 +109,16 @@ "sensor.ip_2" ], "title": "External IP", - "type": "glance" + "type": "entities", + "view_layout": { + "position": "sidebar" + } }, { "type": "vertical-stack", "cards": [ { - "type": "glance", + "type": "entities", "entities": [ { "entity": "sensor.speedtest_ping" @@ -146,7 +143,10 @@ "service": "speedtestdotnet.speedtest" } } - ] + ], + "view_layout": { + "position": "sidebar" + } }, { "type": "history-graph", @@ -158,13 +158,11 @@ "entity": "sensor.freebsd_router_kib_s_sent" } ], - "title": "pfSense", + "title": "pfSense - Traffico di Rete", "refresh_interval": 0, - "hours_to_show": 2 + "hours_to_show": 6 } - ], - "icon": "mdi:lan", - "title": "Dispositivi di Rete" + ] }, { "badges": [], @@ -273,15 +271,15 @@ "sort_by_level": "desc", "entities": [ { - "entity": "sensor.main_door_battery", + "entity": "sensor.porta_casa_battery", "name": "Porta Casa" }, { - "entity": "sensor.front_balcony_battery", + "entity": "sensor.temperatura_balcone_battery", "name": "Temperatura Balcone" }, { - "entity": "sensor.rear_balcony_battery", + "entity": "sensor.temperatura_veranda_battery", "name": "Temperatura Veranda" }, { -- 2.47.3