Skip to content
Snippets Groups Projects
Commit c5f012c8 authored by Sebastian Muszynski's avatar Sebastian Muszynski Committed by Paulus Schoutsen
Browse files

Remove load power attribute for channel USB (#14996)

* Remove load power attribute for channel USB

* Fix format
parent 656eae28
No related branches found
No related tags found
No related merge requests found
......@@ -421,8 +421,11 @@ class ChuangMiPlugSwitch(XiaomiPlugGenericSwitch):
self._device_features = FEATURE_FLAGS_PLUG_V3
self._state_attrs.update({
ATTR_WIFI_LED: None,
ATTR_LOAD_POWER: None,
})
if self._channel_usb is False:
self._state_attrs.update({
ATTR_LOAD_POWER: None,
})
async def async_turn_on(self, **kwargs):
"""Turn a channel on."""
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment