Masks and zones improvements (#22163)

* migrator and runtime config changes

* component changes to use rasterized_mask

* frontend

* convert none to empty string for config save

* i18n

* update tests

* add enabled config to zones

* zones frontend

* i18n

* docs

* tweaks

* use dashed stroke to indicate disabled

* allow toggle from icon

* use filelock to ensure atomic config updates from endpoint

* enforce atomic config update in the frontend

* toggle via mqtt

* fix global object masks

* correctly handle global object masks in dispatcher

* ws hooks

* render masks and zones based on ws enabled state

* use enabled_in_config for zones and masks

* frontend for enabled_in_config

* tweaks

* i18n

* publish websocket on config save

* i18n tweaks

* pydantic title and description

* i18n generation

* tweaks

* fix typing
This commit is contained in:
Josh Hawkins
2026-02-28 07:04:43 -07:00
committed by GitHub
parent fa1f9a1fa4
commit 6a21b2952d
37 changed files with 1964 additions and 739 deletions
+23 -1
View File
@@ -505,6 +505,7 @@
"all": "All Masks and Zones"
},
"restart_required": "Restart required (masks/zones changed)",
"disabledInConfig": "Item is disabled in the config file",
"toast": {
"success": {
"copyCoordinates": "Copied coordinates for {{polyName}} to clipboard."
@@ -514,7 +515,7 @@
}
},
"motionMaskLabel": "Motion Mask {{number}}",
"objectMaskLabel": "Object Mask {{number}} ({{label}})",
"objectMaskLabel": "Object Mask {{number}}",
"form": {
"zoneName": {
"error": {
@@ -588,6 +589,10 @@
"inputPlaceHolder": "Enter a name…",
"tips": "Name must be at least 2 characters, must have at least one letter, and must not be the name of a camera or another zone on this camera."
},
"enabled": {
"title": "Enabled",
"description": "Whether this zone is active and enabled in the config file. If disabled, it cannot be enabled by MQTT. Disabled zones are ignored at runtime."
},
"inertia": {
"title": "Inertia",
"desc": "Specifies how many frames that an object must be in a zone before they are considered in the zone. <em>Default: 3</em>"
@@ -632,12 +637,18 @@
},
"add": "New Motion Mask",
"edit": "Edit Motion Mask",
"defaultName": "Motion Mask {{number}}",
"context": {
"title": "Motion masks are used to prevent unwanted types of motion from triggering detection (example: tree branches, camera timestamps). Motion masks should be used <em>very sparingly</em>, over-masking will make it more difficult for objects to be tracked."
},
"point_one": "{{count}} point",
"point_other": "{{count}} points",
"clickDrawPolygon": "Click to draw a polygon on the image.",
"name": {
"title": "Name",
"description": "An optional friendly name for this motion mask.",
"placeholder": "Enter a name..."
},
"polygonAreaTooLarge": {
"title": "The motion mask is covering {{polygonArea}}% of the camera frame. Large motion masks are not recommended.",
"tips": "Motion masks do not prevent objects from being detected. You should use a required zone instead."
@@ -662,6 +673,11 @@
"point_one": "{{count}} point",
"point_other": "{{count}} points",
"clickDrawPolygon": "Click to draw a polygon on the image.",
"name": {
"title": "Name",
"description": "An optional friendly name for this object mask.",
"placeholder": "Enter a name..."
},
"objects": {
"title": "Objects",
"desc": "The object type that applies to this object mask.",
@@ -673,6 +689,12 @@
"noName": "Object Mask has been saved."
}
}
},
"masks": {
"enabled": {
"title": "Enabled",
"description": "Whether this mask is enabled in the config file. If disabled, it cannot be enabled by MQTT. Disabled masks are ignored at runtime."
}
}
},
"motionDetectionTuner": {