diff --git a/homeassistant/components/image_processing/__init__.py b/homeassistant/components/image_processing/__init__.py index 8e59ba53958..c63d3d01ce9 100644 --- a/homeassistant/components/image_processing/__init__.py +++ b/homeassistant/components/image_processing/__init__.py @@ -28,6 +28,11 @@ _LOGGER = logging.getLogger(__name__) SCAN_INTERVAL = timedelta(seconds=10) +DEVICE_CLASSES = [ + 'alpr', # automatic license plate recognition + 'face', # face +] + SERVICE_SCAN = 'scan' ATTR_CONFIDENCE = 'confidence' diff --git a/homeassistant/components/image_processing/microsoft_face_identify.py b/homeassistant/components/image_processing/microsoft_face_identify.py index 1cc17f1443b..8d716bea0d5 100644 --- a/homeassistant/components/image_processing/microsoft_face_identify.py +++ b/homeassistant/components/image_processing/microsoft_face_identify.py @@ -90,6 +90,11 @@ class ImageProcessingFaceEntity(ImageProcessingEntity): return state + @property + def device_class(self): + """Return the class of this device, from component DEVICE_CLASSES.""" + return 'face' + @property def state_attributes(self): """Return device specific state attributes.""" diff --git a/homeassistant/components/image_processing/openalpr_local.py b/homeassistant/components/image_processing/openalpr_local.py index dbd404dd04c..a9378dd653d 100644 --- a/homeassistant/components/image_processing/openalpr_local.py +++ b/homeassistant/components/image_processing/openalpr_local.py @@ -94,6 +94,11 @@ class ImageProcessingAlprEntity(ImageProcessingEntity): plate = i_pl return plate + @property + def device_class(self): + """Return the class of this device, from component DEVICE_CLASSES.""" + return 'alpr' + @property def state_attributes(self): """Return device specific state attributes."""