From 0c5e4e5a049e1f9c02b84c3e16dcb1fd61d4c09c Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Tue, 27 Oct 2026 11:24:40 +0100 Subject: [PATCH] Added presence sensor for the office --- .storage/lovelace.lovelace_devices | 56 +++++++++++++++++++++++++++++ .storage/lovelace.lovelace_settings | 12 +++++-- customizations/zigbee.yaml | 12 +++++++ log/logbook.yaml | 4 +++ log/recorder.yaml | 4 +++ 5 files changed, 85 insertions(+), 3 deletions(-) diff --git a/.storage/lovelace.lovelace_devices b/.storage/lovelace.lovelace_devices index 5868fc6d..3ff17839 100644 --- a/.storage/lovelace.lovelace_devices +++ b/.storage/lovelace.lovelace_devices @@ -4061,6 +4061,62 @@ } ] }, + { + "type": "grid", + "cards": [ + { + "type": "heading", + "heading": "Sensore Presenza Studio - SONOFF SNZB-03P", + "heading_style": "title" + }, + { + "type": "entities", + "show_header_toggle": "off", + "style": ".card-header {\n padding: 0px 0px 0px 0px !important;\n}\n", + "entities": [ + { + "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": "https://www.zigbee2mqtt.io/images/devices/SNZB-03P.png" + }, + { + "type": "vertical-stack", + "cards": [ + { + "type": "custom:button-card", + "template": "template_device_generic_state", + "entity": "binary_sensor.sensore_presenza_studio_occupancy", + "name": "Stato" + }, + { + "type": "custom:button-card", + "template": "template_device_generic_battery_state", + "entity": "sensor.sensore_presenza_studio_illumination", + "name": "Illuminazione" + }, + { + "type": "custom:button-card", + "template": "template_device_generic_battery_state", + "entity": "sensor.sensore_presenza_studio_battery", + "name": "Batteria" + } + ] + } + ] + } + ] + } + ] + } + ] + }, { "type": "grid", "cards": [ diff --git a/.storage/lovelace.lovelace_settings b/.storage/lovelace.lovelace_settings index 81276d4d..6639dd1e 100644 --- a/.storage/lovelace.lovelace_settings +++ b/.storage/lovelace.lovelace_settings @@ -260,9 +260,7 @@ } ] } - ], - "max_columns": 3, - "path": "config" + ] }, { "icon": "mdi:zigbee", @@ -435,6 +433,14 @@ "entity": "sensor.sensore_acqua_veranda_battery", "name": "Sensore Acqua Veranda" }, + { + "entity": "sensor.sensore_presenza_studio_battery", + "name": "Sensore Presenza Studio" + }, + { + "entity": "sensor.sensore_presenza_bagno_grande_battery", + "name": "Sensore Presenza Bagno Grande" + }, { "entity": "sensor.wireless_button_battery", "name": "wireless_button" diff --git a/customizations/zigbee.yaml b/customizations/zigbee.yaml index 2798cdef..7c3e3e68 100644 --- a/customizations/zigbee.yaml +++ b/customizations/zigbee.yaml @@ -147,3 +147,15 @@ sensor.sensore_presenza_bagno_grande_illumination: friendly_name: "Illuminazione" sensor.sensore_presenza_bagno_grande_voltage: friendly_name: "Tensione" + +# Sensore Presenza Studio +binary_sensor.sensore_presenza_studio_occupancy: + friendly_name: "Presenza Rilevata" +number.sensore_presenza_studio_motion_timeout: + friendly_name: "Timeout" +sensor.sensore_presenza_studio_battery: + friendly_name: "Sensore Batteria" +sensor.sensore_presenza_studio_illumination: + friendly_name: "Illuminazione" +sensor.sensore_presenza_studio_voltage: + friendly_name: "Tensione" diff --git a/log/logbook.yaml b/log/logbook.yaml index 013bb8c4..e0f4ecca 100644 --- a/log/logbook.yaml +++ b/log/logbook.yaml @@ -98,6 +98,10 @@ exclude: - sensor.sensore_presenza_bagno_grande_battery - sensor.sensore_presenza_bagno_grande_illumination - sensor.sensore_presenza_bagno_grande_voltage + - binary_sensor.sensore_presenza_studio_occupancy + - sensor.sensore_presenza_studio_battery + - sensor.sensore_presenza_studio_illumination + - sensor.sensore_presenza_studio_voltage # pfSense - binary_sensor.freebsd_router_stato_della_wan #- sensor.freebsd_router_dati_inviati diff --git a/log/recorder.yaml b/log/recorder.yaml index 6119fbac..78e5f80d 100644 --- a/log/recorder.yaml +++ b/log/recorder.yaml @@ -100,6 +100,10 @@ exclude: - sensor.sensore_presenza_bagno_grande_battery - sensor.sensore_presenza_bagno_grande_illumination - sensor.sensore_presenza_bagno_grande_voltage + - binary_sensor.sensore_presenza_studio_occupancy + - sensor.sensore_presenza_studio_battery + - sensor.sensore_presenza_studio_illumination + - sensor.sensore_presenza_studio_voltage # pfSense - binary_sensor.freebsd_router_stato_della_wan #- sensor.freebsd_router_dati_inviati -- 2.47.3