def __init__(self, data_handler, data_class, camera_id: str, camera_type: str, home_id: str): """Initialize a Netatmo Presence camera light.""" LightEntity.__init__(self) NetatmoBase.__init__(self, data_handler) self._data_classes.append({"name": data_class}) self._camera_id = camera_id self._home_id = home_id self._camera_type = camera_type self._name = f"{MANUFACTURER} {self._data.get_camera(camera_id).get('name')}" self._is_on = False self._unique_id = f"{self._camera_id}-light"
def __init__( self, data_handler: NetatmoDataHandler, camera_id: str, camera_type: str, home_id: str, ) -> None: """Initialize a Netatmo Presence camera light.""" LightEntity.__init__(self) super().__init__(data_handler) self._data_classes.append( {"name": CAMERA_DATA_CLASS_NAME, SIGNAL_NAME: CAMERA_DATA_CLASS_NAME} ) self._id = camera_id self._home_id = home_id self._model = camera_type self._device_name: str = self._data.get_camera(camera_id)["name"] self._attr_name = f"{MANUFACTURER} {self._device_name}" self._is_on = False self._attr_unique_id = f"{self._id}-light"