mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Remove load power attribute for channel USB (#14996)
* Remove load power attribute for channel USB * Fix format
This commit is contained in:
parent
656eae288e
commit
c5f012c85a
@ -421,6 +421,9 @@ class ChuangMiPlugSwitch(XiaomiPlugGenericSwitch):
|
||||
self._device_features = FEATURE_FLAGS_PLUG_V3
|
||||
self._state_attrs.update({
|
||||
ATTR_WIFI_LED: None,
|
||||
})
|
||||
if self._channel_usb is False:
|
||||
self._state_attrs.update({
|
||||
ATTR_LOAD_POWER: None,
|
||||
})
|
||||
|
||||
@ -476,7 +479,7 @@ class ChuangMiPlugSwitch(XiaomiPlugGenericSwitch):
|
||||
if state.wifi_led:
|
||||
self._state_attrs[ATTR_WIFI_LED] = state.wifi_led
|
||||
|
||||
if state.load_power:
|
||||
if self._channel_usb is False and state.load_power:
|
||||
self._state_attrs[ATTR_LOAD_POWER] = state.load_power
|
||||
|
||||
except DeviceException as ex:
|
||||
|
Loading…
x
Reference in New Issue
Block a user