diff --git a/custom_components/philips_airpurifier_coap/binary_sensor.py b/custom_components/philips_airpurifier_coap/binary_sensor.py index c94c051..85d83c0 100644 --- a/custom_components/philips_airpurifier_coap/binary_sensor.py +++ b/custom_components/philips_airpurifier_coap/binary_sensor.py @@ -11,7 +11,6 @@ from homeassistant.const import ATTR_DEVICE_CLASS, CONF_ENTITY_CATEGORY from homeassistant.core import HomeAssistant from homeassistant.helpers.entity import Entity -from homeassistant.util import slugify from .config_entry_data import ConfigEntryData from .const import BINARY_SENSOR_TYPES, DOMAIN, FanAttributes @@ -81,7 +80,7 @@ def __init__( model = config_entry_data.device_information.model device_id = config_entry_data.device_information.device_id - self._attr_unique_id = f"{slugify(model)}-{slugify(device_id)}-{kind.lower()}" + self._attr_unique_id = f"{model}-{device_id}-{kind.lower()}" self._attrs: dict[str, Any] = {} self.kind = kind diff --git a/custom_components/philips_airpurifier_coap/light.py b/custom_components/philips_airpurifier_coap/light.py index 28b2f44..065ce1f 100644 --- a/custom_components/philips_airpurifier_coap/light.py +++ b/custom_components/philips_airpurifier_coap/light.py @@ -18,7 +18,6 @@ from homeassistant.const import ATTR_DEVICE_CLASS, ATTR_ICON, CONF_ENTITY_CATEGORY from homeassistant.core import HomeAssistant from homeassistant.helpers.entity import Entity -from homeassistant.util import slugify from .config_entry_data import ConfigEntryData from .const import ( @@ -121,7 +120,7 @@ def __init__( model = config_entry_data.device_information.model device_id = config_entry_data.device_information.device_id - self._attr_unique_id = f"{slugify(model)}-{slugify(device_id)}-{light.lower()}" + self._attr_unique_id = f"{model}-{device_id}-{light.lower()}" self._attrs: dict[str, Any] = {} self.kind = light.partition("#")[0] diff --git a/custom_components/philips_airpurifier_coap/number.py b/custom_components/philips_airpurifier_coap/number.py index dab4de9..757f87e 100644 --- a/custom_components/philips_airpurifier_coap/number.py +++ b/custom_components/philips_airpurifier_coap/number.py @@ -11,7 +11,6 @@ from homeassistant.const import ATTR_DEVICE_CLASS, ATTR_ICON, CONF_ENTITY_CATEGORY from homeassistant.core import HomeAssistant from homeassistant.helpers.entity import Entity -from homeassistant.util import slugify from .config_entry_data import ConfigEntryData from .const import DOMAIN, NUMBER_TYPES, FanAttributes @@ -88,7 +87,7 @@ def __init__( model = config_entry_data.device_information.model device_id = config_entry_data.device_information.device_id - self._attr_unique_id = f"{slugify(model)}-{slugify(device_id)}-{number.lower()}" + self._attr_unique_id = f"{model}-{device_id}-{number.lower()}" self._attrs: dict[str, Any] = {} self.kind = number diff --git a/custom_components/philips_airpurifier_coap/philips.py b/custom_components/philips_airpurifier_coap/philips.py index 5d66915..6102ffa 100644 --- a/custom_components/philips_airpurifier_coap/philips.py +++ b/custom_components/philips_airpurifier_coap/philips.py @@ -13,7 +13,6 @@ from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC, DeviceInfo from homeassistant.helpers.entity import Entity -from homeassistant.util import slugify from homeassistant.util.percentage import ( ordered_list_item_to_percentage, percentage_to_ordered_list_item, @@ -139,7 +138,7 @@ def __init__( )[0] model = config_entry_data.device_information.model device_id = config_entry_data.device_information.device_id - self._attr_unique_id = f"{slugify(model)}-{slugify(device_id)}" + self._attr_unique_id = f"{model}-{device_id}" class PhilipsGenericCoAPFanBase(PhilipsGenericFan): diff --git a/custom_components/philips_airpurifier_coap/select.py b/custom_components/philips_airpurifier_coap/select.py index d990b0b..83026b7 100644 --- a/custom_components/philips_airpurifier_coap/select.py +++ b/custom_components/philips_airpurifier_coap/select.py @@ -11,7 +11,6 @@ from homeassistant.const import ATTR_DEVICE_CLASS, CONF_ENTITY_CATEGORY from homeassistant.core import HomeAssistant from homeassistant.helpers.entity import Entity -from homeassistant.util import slugify from .config_entry_data import ConfigEntryData from .const import DOMAIN, OPTIONS, SELECT_TYPES, FanAttributes @@ -90,7 +89,7 @@ def __init__( model = config_entry_data.device_information.model device_id = config_entry_data.device_information.device_id - self._attr_unique_id = f"{slugify(model)}-{slugify(device_id)}-{select.lower()}" + self._attr_unique_id = f"{model}-{device_id}-{select.lower()}" self._attrs: dict[str, Any] = {} self.kind = select.partition("#")[0] diff --git a/custom_components/philips_airpurifier_coap/sensor.py b/custom_components/philips_airpurifier_coap/sensor.py index 4355268..7abcc13 100644 --- a/custom_components/philips_airpurifier_coap/sensor.py +++ b/custom_components/philips_airpurifier_coap/sensor.py @@ -19,7 +19,6 @@ from homeassistant.exceptions import PlatformNotReady from homeassistant.helpers.entity import Entity, EntityCategory from homeassistant.helpers.typing import StateType -from homeassistant.util import slugify from .config_entry_data import ConfigEntryData from .const import ( @@ -123,7 +122,7 @@ def __init__( model = config_entry_data.device_information.model device_id = config_entry_data.device_information.device_id - self._attr_unique_id = f"{slugify(model)}-{slugify(device_id)}-{kind.lower()}" + self._attr_unique_id = f"{model}-{device_id}-{kind.lower()}" self._attrs: dict[str, Any] = {} self.kind = kind diff --git a/custom_components/philips_airpurifier_coap/switch.py b/custom_components/philips_airpurifier_coap/switch.py index 48107d0..9e2162f 100644 --- a/custom_components/philips_airpurifier_coap/switch.py +++ b/custom_components/philips_airpurifier_coap/switch.py @@ -11,7 +11,6 @@ from homeassistant.const import ATTR_DEVICE_CLASS, ATTR_ICON, CONF_ENTITY_CATEGORY from homeassistant.core import HomeAssistant from homeassistant.helpers.entity import Entity -from homeassistant.util import slugify from .config_entry_data import ConfigEntryData from .const import DOMAIN, SWITCH_OFF, SWITCH_ON, SWITCH_TYPES, FanAttributes @@ -83,7 +82,7 @@ def __init__( model = config_entry_data.device_information.model device_id = config_entry_data.device_information.device_id - self._attr_unique_id = f"{slugify(model)}-{slugify(device_id)}-{switch.lower()}" + self._attr_unique_id = f"{model}-{device_id}-{switch.lower()}" self._attrs: dict[str, Any] = {} self.kind = switch