Use SensorDeviceClass.VOLUME in components (#79253)

This commit is contained in:
epenet 2022-09-29 09:38:06 +02:00 committed by GitHub
parent 0e764b57c2
commit fab3ee90b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 23 additions and 2 deletions

View file

@ -67,6 +67,7 @@ async def async_setup_entry(
class FloDailyUsageSensor(FloEntity, SensorEntity):
"""Monitors the daily water usage."""
_attr_device_class = SensorDeviceClass.VOLUME
_attr_icon = WATER_ICON
_attr_native_unit_of_measurement = VOLUME_GALLONS
_attr_state_class: SensorStateClass = SensorStateClass.TOTAL_INCREASING