Skip to content

Commit

Permalink
Merge pull request #8 from danielrheinbay/use-resource-id-as-unique-id
Browse files Browse the repository at this point in the history
Use resource ID as unique id.
  • Loading branch information
myTselection authored Jun 15, 2023
2 parents 5024b51 + c74d284 commit cd9c1e4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions custom_components/pixometer/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,8 @@ def icon(self) -> str:

@property
def unique_id(self) -> str:
"""Return the name of the sensor."""
return (
f"{NAME} {self._meter_details.get('location_in_building').replace('-', '_')}"
)
"""Return the unique ID of the sensor."""
return self._meter_details.get('resource_id')


@property
Expand Down

0 comments on commit cd9c1e4

Please sign in to comment.