New Supervisor core-2021.4.0b0 breaks EWeLinkToggle light/turn_on
Device: Sonoff RFR3 inline switch with RF Firmware: PSF-BD1-GL v3.6.0 (using local & cloud) SonoffLAN v.2.4.2
When switching on via Home Assistant, it fails, and I get message, Failed to call service light/turn_on. 'EWeLinkToggle' object has no attribute 'supported_color_modes'
https://github.com/home-assistant/core/commit/5f2326fb5756b85255cec27d3b2172c44bc66058 indicates SUPPORT_COLOR is now deprecated, replaced by "color modes". Below is rundown of new attribute for color modes.
Color mode of the light
ATTR_COLOR_MODE = "color_mode"
List of color modes supported by the light
ATTR_SUPPORTED_COLOR_MODES = "supported_color_modes"
Possible color modes
COLOR_MODE_UNKNOWN = "unknown" # Ambiguous color mode COLOR_MODE_ONOFF = "onoff" # Must be the only supported mode COLOR_MODE_BRIGHTNESS = "brightness" # Must be the only supported mode COLOR_MODE_COLOR_TEMP = "color_temp" COLOR_MODE_HS = "hs" COLOR_MODE_XY = "xy" COLOR_MODE_RGB = "rgb" COLOR_MODE_RGBW = "rgbw" COLOR_MODE_RGBWW = "rgbww"
I’m also getting this issue
Same problem here. Pls update ASAP
Same problem :(
please fix it, the same with core-2021-4.0
Same problem with sonoff basic2 firmware 3.5 and sonoff touch US firmware 3.5 Anyone is working on that bug?
i Have same problem with sonoff mini and firmware 3.6
Same problem with same error.
Looks like SUPPORT_COLOR is now deprecated, replaced by "color modes"
Same for me, someone has find a solution?
same for me, wait a update
Ran into the same problem. Made some minor changes to switch.py to get it working again while we wait for an update.
At switch.py line 75 replace this:
@property
def state_attributes(self):
return self._attrs
with this:
@property
def state_attributes(self):
# return self._attrs
return {
**self._attrs,
"supported_color_modes": "onoff"
}
@property
def supported_color_modes(self):
return "onoff"
Restart Home Assistant and you should be good to go!
Cheers!
Ran into the same problem. Made some minor changes to
switch.pyto get it working again while we wait for an update.At
switch.pyline 75replace this:@property def state_attributes(self): return self._attrswith this:
@property def state_attributes(self): # return self._attrs return { **self._attrs, "supported_color_modes": "onoff" } @property def supported_color_modes(self): return "onoff"Restart Home Assistant and you should be good to go!
Cheers!
Works! Thank you.
Mi sono imbattuto nello stesso problema. Ho apportato alcune piccole modifiche per
switch.pyfarlo funzionare di nuovo in attesa di un aggiornamento.A
switch.pyline 75sostituire questo:@property def state_attributes(self): return self._attrscon questo:
@property def state_attributes(self): # return self._attrs return { **self._attrs, "supported_color_modes": "onoff" } @property def supported_color_modes(self): return "onoff"Riavvia Home Assistant e dovresti essere pronto per partire!
Saluti!
Thanks man
Updated to v2.4.3 and this also fixed the problem, so no need for the manual changes to switch.py anymore.
Thanks @AlexxIT
Updated to 2.4.3, very fast to react ! Thanks a lot @AlexxIT .
Thanks @AlexxIT
This patch works for me Thanks
Awesome work thanks :)