Skip to content

Commit

Permalink
Remove random from unique_id
Browse files Browse the repository at this point in the history
  • Loading branch information
deler committed Nov 16, 2023
1 parent f17fd23 commit e59d259
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/fuel_prices_sweden/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
CONF_FUEL_TYPE = "fuel_type"
CONF_PRICE = "price"
CONF_UPDATED_AT = "updated_at"
CONF_ENTRY_TITLE = "Fuel Price"
CONF_ENTRY_TITLE = "Fuel Prices"
CONF_IS_MANUAL = "is_manual"

PLACEHOLDER_KEY_STATION_NAME = "station_name"
Expand Down
3 changes: 1 addition & 2 deletions custom_components/fuel_prices_sweden/sensor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Sensor module."""
import logging
import random

from homeassistant.components.sensor import (
SensorEntity,
Expand Down Expand Up @@ -110,7 +109,7 @@ def should_poll(self):
@property
def unique_id(self):
"""Get unique_id."""
return f"{self._id}_{random.randint(1, 100)}"
return f"{self._id}"

@property
def device_class(self):
Expand Down

0 comments on commit e59d259

Please sign in to comment.