Skip to content

Commit

Permalink
Fix SensorStateClass
Browse files Browse the repository at this point in the history
  • Loading branch information
netsoft-ruidias authored May 19, 2023
1 parent 045dbef commit 82b01d3
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 82b01d3

Please sign in to comment.