Skip to content

Commit

Permalink
Add unique_id to IceCreamVanSensor
Browse files Browse the repository at this point in the history
  • Loading branch information
studiojw committed Jul 23, 2024
1 parent 7aa08ed commit 83bf42a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/ice_cream_benelux/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/studiojw/ice-cream-benelux-ha/issues",
"requirements": [],
"version": "1.1.3"
"version": "1.1.4"
}
5 changes: 5 additions & 0 deletions custom_components/ice_cream_benelux/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ def name(self):
"""Return the name of the sensor."""
return self._name

@property
def unique_id(self):
"""Return the unique id of the sensor."""
return f"{APP_NAME}_{self._company}_{self._user_lat}_{self._user_lon}"

@property
def state(self):
"""Return the state of the sensor."""
Expand Down

0 comments on commit 83bf42a

Please sign in to comment.