diff --git a/custom_components/mail_and_packages/camera.py b/custom_components/mail_and_packages/camera.py index 628635cc..cf65d333 100644 --- a/custom_components/mail_and_packages/camera.py +++ b/custom_components/mail_and_packages/camera.py @@ -195,9 +195,9 @@ def name(self): return self._name @property - def device_state_attributes(self): + def extra_state_attributes(self): """Return the camera state attributes.""" - return {"file_path": self._file_path, CONF_HOST: self._host} + return {"file_path": self._file_path} @property def should_poll(self) -> bool: diff --git a/custom_components/mail_and_packages/sensor.py b/custom_components/mail_and_packages/sensor.py index d35196d3..c3b4e02d 100644 --- a/custom_components/mail_and_packages/sensor.py +++ b/custom_components/mail_and_packages/sensor.py @@ -113,10 +113,9 @@ def available(self) -> bool: return self.coordinator.last_update_success @property - def device_state_attributes(self) -> Optional[str]: + def extra_state_attributes(self) -> Optional[str]: """Return device specific state attributes.""" attr = {} - attr[ATTR_SERVER] = self._host tracking = f"{self.type.split('_')[0]}_tracking" data = self.coordinator.data