diff --git a/homeassistant/components/starline/sensor.py b/homeassistant/components/starline/sensor.py index a53751a3b23..f9bd304c1e1 100644 --- a/homeassistant/components/starline/sensor.py +++ b/homeassistant/components/starline/sensor.py @@ -6,6 +6,7 @@ from homeassistant.components.sensor import ( SensorDeviceClass, SensorEntity, SensorEntityDescription, + SensorStateClass, ) from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( @@ -30,47 +31,57 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = ( translation_key="battery", device_class=SensorDeviceClass.VOLTAGE, native_unit_of_measurement=UnitOfElectricPotential.VOLT, + state_class=SensorStateClass.MEASUREMENT, ), SensorEntityDescription( key="balance", translation_key="balance", + state_class=SensorStateClass.MEASUREMENT, ), SensorEntityDescription( key="ctemp", translation_key="interior_temperature", device_class=SensorDeviceClass.TEMPERATURE, native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, ), SensorEntityDescription( key="etemp", translation_key="engine_temperature", device_class=SensorDeviceClass.TEMPERATURE, native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, ), SensorEntityDescription( key="gsm_lvl", translation_key="gsm_signal", native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, ), SensorEntityDescription( key="fuel", translation_key="fuel", + state_class=SensorStateClass.MEASUREMENT, ), SensorEntityDescription( key="errors", translation_key="errors", + native_unit_of_measurement="errors", entity_category=EntityCategory.DIAGNOSTIC, + state_class=SensorStateClass.MEASUREMENT, ), SensorEntityDescription( key="mileage", translation_key="mileage", native_unit_of_measurement=UnitOfLength.KILOMETERS, device_class=SensorDeviceClass.DISTANCE, + state_class=SensorStateClass.TOTAL_INCREASING, ), SensorEntityDescription( key="gps_count", translation_key="gps_count", native_unit_of_measurement="satellites", + state_class=SensorStateClass.MEASUREMENT, ), )