Skip to content

Commit

Permalink
Fix for frozen EntityDescription in 2024.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pnbruckner committed Dec 29, 2023
1 parent eed3297 commit 57addc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/illuminance/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class Mode(Enum):
Num = Union[float, int]


@dataclass
@dataclass(frozen=True, kw_only=True)
class IlluminanceSensorEntityDescription(SensorEntityDescription):
"""Illuminance sensor entity description."""

Expand All @@ -170,7 +170,7 @@ def _sensor(
) -> Entity:
"""Create entity to add."""
entity_description = IlluminanceSensorEntityDescription(
DOMAIN,
key=DOMAIN,
device_class=SensorDeviceClass.ILLUMINANCE,
name=cast(str, config[CONF_NAME]),
native_unit_of_measurement=LIGHT_LUX,
Expand Down

0 comments on commit 57addc0

Please sign in to comment.