mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Fix broadlink creating duplicate unique IDs (#52621)
This commit is contained in:
parent
1ba5c1c9fb
commit
c5d806fdbe
@ -146,7 +146,6 @@ class BroadlinkSwitch(BroadlinkEntity, SwitchEntity, RestoreEntity, ABC):
|
|||||||
self._attr_assumed_state = True
|
self._attr_assumed_state = True
|
||||||
self._attr_device_class = DEVICE_CLASS_SWITCH
|
self._attr_device_class = DEVICE_CLASS_SWITCH
|
||||||
self._attr_name = f"{self._device.name} Switch"
|
self._attr_name = f"{self._device.name} Switch"
|
||||||
self._attr_unique_id = self._device.unique_id
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_on(self):
|
def is_on(self):
|
||||||
@ -215,6 +214,7 @@ class BroadlinkSP1Switch(BroadlinkSwitch):
|
|||||||
def __init__(self, device):
|
def __init__(self, device):
|
||||||
"""Initialize the switch."""
|
"""Initialize the switch."""
|
||||||
super().__init__(device, 1, 0)
|
super().__init__(device, 1, 0)
|
||||||
|
self._attr_unique_id = self._device.unique_id
|
||||||
|
|
||||||
async def _async_send_packet(self, packet):
|
async def _async_send_packet(self, packet):
|
||||||
"""Send a packet to the device."""
|
"""Send a packet to the device."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user