Yeelight integration - "Config flow could not be loaded"

Tags: #<Tag:0x00007fc4156949f8>

I upgraded to 2021.8 from an old version, maybe from six months ago. This was to enable my roborock s7 to work correctly, which it did. My Yeelights did not load properly so I deleted the integration and restarted Home Assistant but now the integration won’t load. I get “Config flow could not be loaded”

[31m2021-08-06 11:59:20 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration yeelight: cannot import name 'Loopback' from partially initialized module 'scapy.layers.l2' (most likely due to a circular import) (/Users/John/homeassistant/lib/python3.9/site-packages/scapy/layers/l2.py)e[0m

Something is up with scapy - I have tried the latest version of scapy as well as rolling back but no change!
DHCP discovery also won’t load but I don’t know if this is related…

For anyone with this issue, ss referenced here, the file in homeassistant/lib/python3.9/site-packages/scapy/arch/bpf/core.py needs two lines added at position 122:

     mac = addresses[0].split(' ')[1]
     mac = [chr(int(b, 16)) for b in mac.split(':')]
[ADD]    if len(mac) != 6:
[ADD]        raise Scapy_Exception("No MAC address found on %s !" % ifname)
     return (ARPHDR_ETHER, ''.join(mac))

This fixed scapy which fixed yeelight and dhcp.