Fix konnected unique_id computation for switches (#22777)
parent
d1bf470899
commit
144632a81b
|
@ -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…
Reference in New Issue