Skip to content

Commit

Permalink
Fix playstation trophy attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
JackJPowell committed Dec 13, 2024
1 parent 5b00d9e commit 68719b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/playstation_network/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,8 @@ def extra_state_attributes(self) -> dict[str, str]:
"""Return the state attributes of the entity."""
if self.coordinator.data.get("title_metadata").get("npTitleId") is not None:
return self.entity_description.attributes_fn(self.coordinator.data)
if self.entity_description.key == "trophy_summary":
return self.entity_description.attributes_fn(self.coordinator.data)


class PsnAttributeSensor(PSNEntity, SensorEntity):
Expand Down

0 comments on commit 68719b6

Please sign in to comment.