Skip to content

Commit c5db987

Browse files
authored
Merge pull request #1 from nohn/fix_2021.12_deprecation_of_entry_type_as_string
As of Home Assistant 2021.12, entry_type as string is deprecated
2 parents a2b10b9 + 1726c38 commit c5db987

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

custom_components/dwd_pollenflug/sensor.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from homeassistant.components.sensor import SensorEntity
55
from homeassistant.const import (ATTR_IDENTIFIERS, ATTR_MANUFACTURER,
66
ATTR_MODEL, ATTR_NAME)
7+
from homeassistant.helpers.device_registry import DeviceEntryType
78
from homeassistant.util.dt import utcnow
89

910
from .const import CONF_REGION_ID, DOMAIN
@@ -60,7 +61,7 @@ def __init__(self, hass, source, region_id, pollen_name):
6061
ATTR_NAME: "Pollenflug-Gefahrenindex",
6162
ATTR_MANUFACTURER: source.sender,
6263
ATTR_MODEL: source.regions_list[region_id].name,
63-
"entry_type": "service",
64+
"entry_type": DeviceEntryType.SERVICE,
6465
}
6566

6667
async def async_update(self):

0 commit comments

Comments
 (0)