Skip to content

Commit cddd075

Browse files
authored
Merge pull request #7 from PTST/4-add-statistics-support
2 parents 7a1e34d + 9781cd8 commit cddd075

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

custom_components/libreview/sensor.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ async def async_setup_entry(
2929

3030
class GlucoseSensor(CoordinatorEntity, SensorEntity):
3131
_attr_native_unit_of_measurement: str
32+
_attr_state_class = "measurement"
3233
uom: GlucoseUnitOfMeasurement
3334

3435
def __init__(
@@ -43,6 +44,11 @@ def __init__(
4344
self.uom = uom
4445
self._attr_native_unit_of_measurement = self.uom.value
4546

47+
@property
48+
def icon(self):
49+
# trend icons?
50+
return "mdi:diabetes"
51+
4652
@property
4753
def connection(self) -> Connection:
4854
return self.coordinator.data["glucose_readings"][self.connection_id]

0 commit comments

Comments
 (0)