Fix switch light adding itself to devices (#68060)
This commit is contained in:
parent
ea6da674df
commit
a902f0ee53
1 changed files with 2 additions and 1 deletions
|
@ -113,4 +113,5 @@ class LightSwitch(LightEntity):
|
||||||
|
|
||||||
# Add this entity to the wrapped switch's device
|
# Add this entity to the wrapped switch's device
|
||||||
registry = er.async_get(self.hass)
|
registry = er.async_get(self.hass)
|
||||||
|
if registry.async_get(self.entity_id) is not None:
|
||||||
registry.async_update_entity(self.entity_id, device_id=self._device_id)
|
registry.async_update_entity(self.entity_id, device_id=self._device_id)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue