Migrate UniFi Protect translations (#83338)

* Migrate UniFi Protect translations

* Move key
This commit is contained in:
Franck Nijhof 2022-12-05 20:10:36 +01:00 committed by GitHub
parent e918adb25d
commit 171bed7637
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 10 deletions

View File

@ -55,7 +55,6 @@ from .utils import async_dispatch_id as _ufpd, async_get_light_motion_current
_LOGGER = logging.getLogger(__name__)
OBJECT_TYPE_NONE = "none"
DEVICE_CLASS_DETECTION = "unifiprotect__detection"
DEVICE_CLASS_LICENSE_PLATE = "unifiprotect__license_plate"
@dataclass
@ -534,11 +533,11 @@ EVENT_SENSORS: tuple[ProtectSensorEventEntityDescription, ...] = (
key="smart_obj_licenseplate",
name="License Plate Detected",
icon="mdi:car",
device_class=DEVICE_CLASS_LICENSE_PLATE,
translation_key="license_plate",
ufp_smart_type=SmartDetectObjectType.LICENSE_PLATE,
ufp_value="is_smart_detected",
ufp_required_field="can_detect_license_plate",
ufp_event_obj="last_smart_detect_event",
ufp_smart_type=SmartDetectObjectType.LICENSE_PLATE,
),
)

View File

@ -80,5 +80,14 @@
"title": "Smart Detection Sensor Deprecated",
"description": "The unified \"Detected Object\" sensor for smart detections is now deprecated. It has been replaced with individual smart detection binary sensors for each smart detection type. Please update any templates or automations accordingly."
}
},
"entity": {
"sensor": {
"license_plate": {
"state": {
"none": "Clear"
}
}
}
}
}

View File

@ -1,7 +0,0 @@
{
"state": {
"unifiprotect__license_plate": {
"none": "Clear"
}
}
}

View File

@ -41,6 +41,15 @@
}
}
},
"entity": {
"sensor": {
"license_plate": {
"state": {
"none": "Clear"
}
}
}
},
"issues": {
"deprecate_smart_sensor": {
"description": "The unified \"Detected Object\" sensor for smart detections is now deprecated. It has been replaced with individual smart detection binary sensors for each smart detection type. Please update any templates or automations accordingly.",