mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix: Xiaomi Plug state is set twice (#17482)
* Xiaomi Plug UI fix #17422 * Review
This commit is contained in:
parent
7eb6e49df7
commit
6239a523cc
@ -137,7 +137,7 @@ class XiaomiGenericSwitch(XiaomiDevice, SwitchDevice):
|
|||||||
self._load_power = round(float(data[LOAD_POWER]), 2)
|
self._load_power = round(float(data[LOAD_POWER]), 2)
|
||||||
|
|
||||||
value = data.get(self._data_key)
|
value = data.get(self._data_key)
|
||||||
if value is None:
|
if value not in ['on', 'off']:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
state = value == 'on'
|
state = value == 'on'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user