Fix sleepiq with python 3.11 (#88098)
There is a breaking change in enum behavior see https://blog.pecar.me/python-enumpull/88106/head
parent
3e8a6cb3b7
commit
9593d9610d
|
@ -56,7 +56,7 @@ def _get_actuator_name(bed: SleepIQBed, actuator: SleepIQActuator) -> str:
|
|||
|
||||
def _get_actuator_unique_id(bed: SleepIQBed, actuator: SleepIQActuator) -> str:
|
||||
if actuator.side:
|
||||
return f"{bed.id}_{actuator.side}_{actuator.actuator}"
|
||||
return f"{bed.id}_{actuator.side.value}_{actuator.actuator}"
|
||||
|
||||
return f"{bed.id}_{actuator.actuator}"
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ class SleepIQSelectEntity(SleepIQBedEntity[SleepIQDataUpdateCoordinator], Select
|
|||
self._attr_unique_id = f"{bed.id}_preset"
|
||||
if preset.side != Side.NONE:
|
||||
self._attr_name += f" {preset.side_full}"
|
||||
self._attr_unique_id += f"_{preset.side}"
|
||||
self._attr_unique_id += f"_{preset.side.value}"
|
||||
|
||||
super().__init__(coordinator, bed)
|
||||
self._async_update_attrs()
|
||||
|
|
Loading…
Reference in New Issue