diff --git a/homeassistant/components/unifiprotect/sensor.py b/homeassistant/components/unifiprotect/sensor.py index fa08892e2d3..9b22c00dbbd 100644 --- a/homeassistant/components/unifiprotect/sensor.py +++ b/homeassistant/components/unifiprotect/sensor.py @@ -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, ), ) diff --git a/homeassistant/components/unifiprotect/strings.json b/homeassistant/components/unifiprotect/strings.json index 8bdd844fdbf..7abf01461c3 100644 --- a/homeassistant/components/unifiprotect/strings.json +++ b/homeassistant/components/unifiprotect/strings.json @@ -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" + } + } + } } } diff --git a/homeassistant/components/unifiprotect/strings.sensor.json b/homeassistant/components/unifiprotect/strings.sensor.json deleted file mode 100644 index ccb16e2d445..00000000000 --- a/homeassistant/components/unifiprotect/strings.sensor.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "state": { - "unifiprotect__license_plate": { - "none": "Clear" - } - } -} diff --git a/homeassistant/components/unifiprotect/translations/en.json b/homeassistant/components/unifiprotect/translations/en.json index 21b3cd64360..cbe58858bf1 100644 --- a/homeassistant/components/unifiprotect/translations/en.json +++ b/homeassistant/components/unifiprotect/translations/en.json @@ -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.",