Skip to content

Commit

Permalink
Moved attributes updates
Browse files Browse the repository at this point in the history
changed to better versioning
  • Loading branch information
jampez77 committed Sep 21, 2023
1 parent 4773e79 commit 4ce0073
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion custom_components/dvla/manifest.json
Expand Up @@ -10,6 +10,6 @@
"issue_tracker": "https://github.com/jampez77/DVLA-Vehicle-Enquiry-Service/issues",
"requirements": [],
"ssdp": [],
"version": "1.0.0",
"version": "2023.9.0",
"zeroconf": []
}
5 changes: 2 additions & 3 deletions custom_components/dvla/sensor.py
Expand Up @@ -122,6 +122,8 @@ def icon(self) -> str:

@property
def extra_state_attributes(self) -> dict[str, Any]:
for key in self.coordinator.data:
self.attrs[key] = self.coordinator.data[key]
return self.attrs

async def async_update(self) -> None:
Expand All @@ -130,9 +132,6 @@ async def async_update(self) -> None:
Only used by the generic entity update service.
"""
try:
for key in self.coordinator.data:
self.attrs[key] = self.coordinator.data[key]

self._state = (
str(self.coordinator.data["yearOfManufacture"])
+ " "
Expand Down

0 comments on commit 4ce0073

Please sign in to comment.