Low battery power saving mode for front doorbell

This commit is contained in:
2025-03-09 13:48:38 -04:00
parent e46e18265e
commit e0473beda4

View File

@ -79,6 +79,14 @@
"info": "",
"env": []
},
{
"id": "ce79e27ec84983a9",
"type": "tab",
"label": "Batteries",
"disabled": false,
"info": "",
"env": []
},
{
"id": "458e4c0055c8c533",
"type": "tab",
@ -2121,6 +2129,31 @@
"w": 1412,
"h": 302
},
{
"id": "1f3d367ed3e35f1f",
"type": "group",
"z": "ce79e27ec84983a9",
"name": "Doorbell Battery Saver",
"style": {
"label": true
},
"nodes": [
"85f64d70ea1ad38b",
"3762233dfe00d338",
"0c394f2de9bd9917",
"eb4303c234c0f911",
"5173aa5c7adb827a",
"b36a4f453c2a06b2",
"977f5fdca9aaa918",
"42a6971dbcdf2dd7",
"160249109f0b494a",
"090187e752453a53"
],
"x": 74,
"y": 59,
"w": 1292,
"h": 162
},
{
"id": "fba69dfc80829db7",
"type": "junction",
@ -22351,6 +22384,363 @@
[]
]
},
{
"id": "85f64d70ea1ad38b",
"type": "server-state-changed",
"z": "ce79e27ec84983a9",
"g": "1f3d367ed3e35f1f",
"name": "Battery Low",
"server": "9e87348d.9c1c48",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"binary_sensor.front_doorbell_battery_plus_low"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
},
{
"property": "id",
"propertyType": "msg",
"value": "front_doorbell_battery_low",
"valueType": "str"
}
],
"x": 170,
"y": 140,
"wires": [
[
"977f5fdca9aaa918"
],
[
"eb4303c234c0f911"
]
]
},
{
"id": "3762233dfe00d338",
"type": "api-call-service",
"z": "ce79e27ec84983a9",
"g": "1f3d367ed3e35f1f",
"name": "Reduce Snapshots",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"select.front_doorbell_snapshot_mode"
],
"labelId": [],
"data": "{\t \"option\":\"Interval + Ding\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "select",
"service": "select_option",
"x": 630,
"y": 100,
"wires": [
[
"0c394f2de9bd9917"
]
]
},
{
"id": "0c394f2de9bd9917",
"type": "api-call-service",
"z": "ce79e27ec84983a9",
"g": "1f3d367ed3e35f1f",
"name": "Increase Interval",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "number.set_value",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"number.front_doorbell_snapshot_interval"
],
"labelId": [],
"data": "{\t \"value\": 600\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "number",
"service": "set_value",
"x": 840,
"y": 100,
"wires": [
[
"b36a4f453c2a06b2"
]
]
},
{
"id": "eb4303c234c0f911",
"type": "api-call-service",
"z": "ce79e27ec84983a9",
"g": "1f3d367ed3e35f1f",
"name": "Increase Snapshots",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "select.select_option",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"select.front_doorbell_snapshot_mode"
],
"labelId": [],
"data": "{\t \"option\":\"All\"\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "select",
"service": "select_option",
"x": 420,
"y": 180,
"wires": [
[
"5173aa5c7adb827a"
]
]
},
{
"id": "5173aa5c7adb827a",
"type": "api-call-service",
"z": "ce79e27ec84983a9",
"g": "1f3d367ed3e35f1f",
"name": "Reduce Interval",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "number.set_value",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"number.front_doorbell_snapshot_interval"
],
"labelId": [],
"data": "{\t \"value\": 300\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "number",
"service": "set_value",
"x": 620,
"y": 180,
"wires": [
[
"160249109f0b494a"
]
]
},
{
"id": "b36a4f453c2a06b2",
"type": "api-call-service",
"z": "ce79e27ec84983a9",
"g": "1f3d367ed3e35f1f",
"name": "Persistent Notification",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "persistent_notification.create",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"title\": title,\t \"message\": message,\t \"notification_id\": id\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "persistent_notification",
"service": "create",
"x": 1060,
"y": 100,
"wires": [
[
"42a6971dbcdf2dd7"
]
]
},
{
"id": "977f5fdca9aaa918",
"type": "change",
"z": "ce79e27ec84983a9",
"g": "1f3d367ed3e35f1f",
"name": "Notification Setup",
"rules": [
{
"t": "set",
"p": "title",
"pt": "msg",
"to": "Front Doorbell Battery Low",
"tot": "str"
},
{
"t": "set",
"p": "message",
"pt": "msg",
"to": "The battery in the front doorbell has reached 25% or less. Activating power saving mode. We will reduce snapshots taken until the battery has a chance to charge.",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 410,
"y": 100,
"wires": [
[
"3762233dfe00d338"
]
]
},
{
"id": "42a6971dbcdf2dd7",
"type": "api-call-service",
"z": "ce79e27ec84983a9",
"g": "1f3d367ed3e35f1f",
"name": "Text Notify",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.text_notify",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"type\": \"normal\",\t \"who\": \"parents\",\t \"title\": title,\t \"message\": message,\t \"tag\": id\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "script",
"service": "text_notify",
"x": 1270,
"y": 100,
"wires": [
[]
]
},
{
"id": "160249109f0b494a",
"type": "api-call-service",
"z": "ce79e27ec84983a9",
"g": "1f3d367ed3e35f1f",
"name": "Persistent Notification Clear",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "persistent_notification.dismiss",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"notification_id\": id\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "persistent_notification",
"service": "dismiss",
"x": 860,
"y": 180,
"wires": [
[
"090187e752453a53"
]
]
},
{
"id": "090187e752453a53",
"type": "api-call-service",
"z": "ce79e27ec84983a9",
"g": "1f3d367ed3e35f1f",
"name": "Text Notify Clear",
"server": "9e87348d.9c1c48",
"version": 7,
"debugenabled": false,
"action": "script.text_notify",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\t \"type\": \"alert\",\t \"who\": \"parents\",\t \"message\": \"clear_notification\",\t \"tag\": id\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "script",
"service": "text_notify",
"x": 1100,
"y": 180,
"wires": [
[]
]
},
{
"id": "9256f78107619596",
"type": "ha-time",