mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Fix konnected unique_id computation for switches (#22777)
This commit is contained in:
parent
a44966f483
commit
dbe53a3947
@ -41,9 +41,10 @@ class KonnectedSwitch(ToggleEntity):
|
||||
self._pause = self._data.get(CONF_PAUSE)
|
||||
self._repeat = self._data.get(CONF_REPEAT)
|
||||
self._state = self._boolean_state(self._data.get(ATTR_STATE))
|
||||
self._unique_id = '{}-{}'.format(device_id, hash(frozenset(
|
||||
{self._pin_num, self._momentary, self._pause, self._repeat})))
|
||||
self._name = self._data.get(CONF_NAME)
|
||||
self._unique_id = '{}-{}-{}-{}-{}'.format(
|
||||
device_id, self._pin_num, self._momentary,
|
||||
self._pause, self._repeat)
|
||||
|
||||
@property
|
||||
def unique_id(self) -> str:
|
||||
|
Loading…
x
Reference in New Issue
Block a user