Skip to content

Commit 314e132

Browse files
Merge pull request #9 from netsoft-ruidias/netsoft-ruidias-patch-1
Fix SensorStateClass
2 parents 045dbef + 82b01d3 commit 314e132

File tree

1 file changed

+2
-2
lines changed
  • custom_components/precoscombustiveis

1 file changed

+2
-2
lines changed

custom_components/precoscombustiveis/sensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def __init__(self, api: DGEG, stationId: float, station: Station, fuelName: str)
6060
self._icon = DEFAULT_ICON
6161
self._unit_of_measurement = UNIT_OF_MEASUREMENT
6262
self._device_class = SensorDeviceClass.MONETARY
63-
self._state_class = SensorStateClass.TOTAL
63+
self._state_class = SensorStateClass.MEASUREMENT
6464
self._state = None
6565
self._available = True
6666

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

0 commit comments

Comments
 (0)