Use device class enums in TwenteMilieu (#60686)
This commit is contained in:
parent
6c7c7acdef
commit
79ebc1b79a
2 changed files with 15 additions and 11 deletions
|
@ -6,9 +6,13 @@ from datetime import date
|
|||
|
||||
from twentemilieu import WasteType
|
||||
|
||||
from homeassistant.components.sensor import SensorEntity, SensorEntityDescription
|
||||
from homeassistant.components.sensor import (
|
||||
SensorDeviceClass,
|
||||
SensorEntity,
|
||||
SensorEntityDescription,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import CONF_ID, DEVICE_CLASS_DATE
|
||||
from homeassistant.const import CONF_ID
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.device_registry import DeviceEntryType
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
|
@ -41,28 +45,28 @@ SENSORS: tuple[TwenteMilieuSensorDescription, ...] = (
|
|||
waste_type=WasteType.NON_RECYCLABLE,
|
||||
name="Non-recyclable Waste Pickup",
|
||||
icon="mdi:delete-empty",
|
||||
device_class=DEVICE_CLASS_DATE,
|
||||
device_class=SensorDeviceClass.DATE,
|
||||
),
|
||||
TwenteMilieuSensorDescription(
|
||||
key="Organic",
|
||||
waste_type=WasteType.ORGANIC,
|
||||
name="Organic Waste Pickup",
|
||||
icon="mdi:delete-empty",
|
||||
device_class=DEVICE_CLASS_DATE,
|
||||
device_class=SensorDeviceClass.DATE,
|
||||
),
|
||||
TwenteMilieuSensorDescription(
|
||||
key="Paper",
|
||||
waste_type=WasteType.PAPER,
|
||||
name="Paper Waste Pickup",
|
||||
icon="mdi:delete-empty",
|
||||
device_class=DEVICE_CLASS_DATE,
|
||||
device_class=SensorDeviceClass.DATE,
|
||||
),
|
||||
TwenteMilieuSensorDescription(
|
||||
key="Plastic",
|
||||
waste_type=WasteType.PACKAGES,
|
||||
name="Packages Waste Pickup",
|
||||
icon="mdi:delete-empty",
|
||||
device_class=DEVICE_CLASS_DATE,
|
||||
device_class=SensorDeviceClass.DATE,
|
||||
),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue