Skip to content

Commit

Permalink
fix: change to extra_state_attributes (#600)
Browse files Browse the repository at this point in the history
  • Loading branch information
firstof9 authored Dec 3, 2021
2 parents 45cc52f + 52bf0ce commit f3f5aa7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions custom_components/mail_and_packages/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions custom_components/mail_and_packages/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f3f5aa7

Please sign in to comment.