Skip to content

Commit

Permalink
Merge pull request #21 from galletn/main
Browse files Browse the repository at this point in the history
Update sensor.py
  • Loading branch information
stijnpiron authored Jan 8, 2025
2 parents 6afc392 + e1ff867 commit 1207f77
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions custom_components/parking_gent/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,8 @@ def extra_state_attributes(self):
def unique_id(self):
"""Return a unique ID for the sensor."""
return f"parking_{self.parking_id.lower().replace(' ', '_')}"

async def async_update(self):
"""Update the sensor."""
await self.coordinator.async_request_refresh()
self.parking_data = self.coordinator.data.get(self.parking_id, {})

0 comments on commit 1207f77

Please sign in to comment.