[SOLVED] LightwaveRF lights unavailable

I have a number of LightwaveRF 2 light switches. Usually they work fine, though recently homeassistant randomly stops being able to control them (I say randomly as I they’ll start working the next day).

The hub is connected, and I’m able to control the lights with the lightwave RF app.

If I look at the entities in the LightwaveRF integration page, I see that the lights are “Restored”, but if I look up a light in developer tools they’re showing as unavailable, and I see the following error in the logs:

2022-01-30 18:47:15 ERROR (MainThread) [homeassistant.components.light] Error while setting up lightwave2 platform for light
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/home/homeassistant/.homeassistant/custom_components/lightwave2/light.py", line 24, in async_setup_entry
    lights.append(LWRF2Light(name, featureset_id, link, url))
  File "/home/homeassistant/.homeassistant/custom_components/lightwave2/light.py", line 42, in __init__
    self._lwlink.get_featureset_by_id(self._featureset_id).features[
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

Any advice as to next steps/possible avenues of investigation would be most appreciated!

Kind Regards,

Neil

Solved this myself with a bit of debugging: I’d replaced a switch and the integration had disabled the assosiated entities, and the disabled entities had “None” for every property. Removed lightwave integration, restarted HA, re-added integration: Problem solved.