mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Fix sleepiq with python 3.11 (#88098)
There is a breaking change in enum behavior see https://blog.pecar.me/python-enum
This commit is contained in:
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:
|
def _get_actuator_unique_id(bed: SleepIQBed, actuator: SleepIQActuator) -> str:
|
||||||
if actuator.side:
|
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}"
|
return f"{bed.id}_{actuator.actuator}"
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class SleepIQSelectEntity(SleepIQBedEntity[SleepIQDataUpdateCoordinator], Select
|
|||||||
self._attr_unique_id = f"{bed.id}_preset"
|
self._attr_unique_id = f"{bed.id}_preset"
|
||||||
if preset.side != Side.NONE:
|
if preset.side != Side.NONE:
|
||||||
self._attr_name += f" {preset.side_full}"
|
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)
|
super().__init__(coordinator, bed)
|
||||||
self._async_update_attrs()
|
self._async_update_attrs()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user