Skip to content

Commit

Permalink
Merge pull request #9 from netsoft-ruidias/netsoft-ruidias-patch-1
Browse files Browse the repository at this point in the history
Fix SensorStateClass
  • Loading branch information
netsoft-ruidias authored May 19, 2023
2 parents 045dbef + 82b01d3 commit 314e132
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/precoscombustiveis/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(self, api: DGEG, stationId: float, station: Station, fuelName: str)
self._icon = DEFAULT_ICON
self._unit_of_measurement = UNIT_OF_MEASUREMENT
self._device_class = SensorDeviceClass.MONETARY
self._state_class = SensorStateClass.TOTAL
self._state_class = SensorStateClass.MEASUREMENT
self._state = None
self._available = True

Expand Down Expand Up @@ -125,4 +125,4 @@ async def async_update(self) -> None:
self._state = gasStation.getPrice(self._fuelName)
except aiohttp.ClientError as err:
self._available = False
_LOGGER.exception("Error updating data from DGEG API. %s", err)
_LOGGER.exception("Error updating data from DGEG API. %s", err)

0 comments on commit 314e132

Please sign in to comment.