Skip to content

Commit

Permalink
Merge pull request #1 from nohn/fix_2021.12_deprecation_of_entry_type…
Browse files Browse the repository at this point in the history
…_as_string

As of Home Assistant 2021.12, entry_type as string is deprecated
  • Loading branch information
mampfes authored Dec 15, 2021
2 parents a2b10b9 + 1726c38 commit c5db987
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/dwd_pollenflug/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from homeassistant.components.sensor import SensorEntity
from homeassistant.const import (ATTR_IDENTIFIERS, ATTR_MANUFACTURER,
ATTR_MODEL, ATTR_NAME)
from homeassistant.helpers.device_registry import DeviceEntryType
from homeassistant.util.dt import utcnow

from .const import CONF_REGION_ID, DOMAIN
Expand Down Expand Up @@ -60,7 +61,7 @@ def __init__(self, hass, source, region_id, pollen_name):
ATTR_NAME: "Pollenflug-Gefahrenindex",
ATTR_MANUFACTURER: source.sender,
ATTR_MODEL: source.regions_list[region_id].name,
"entry_type": "service",
"entry_type": DeviceEntryType.SERVICE,
}

async def async_update(self):
Expand Down

0 comments on commit c5db987

Please sign in to comment.