All of a sudden when i try to control my lights via HASS i get an error that says:
Failed to call service light/turn_off. 'NoneType' object has no attribute 'write'
There’s nothing in the log about it failing to initialize or the Lutron component or anything like that. I’m not sure what changed or even what steps to follow next. I can still control the lights via the Lutron app itself.
Log Details (ERROR)
Sun Jan 12 2020 13:47:07 GMT-0800 (Pacific Standard Time)
'Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 564, in async_request_call
await coro
File “/usr/src/homeassistant/homeassistant/components/lutron_caseta/light.py”, line 45, in async_turn_on
self._smartbridge.set_value(self._device_id, to_lutron_level(brightness))
File “/usr/local/lib/python3.7/site-packages/pylutron_caseta/smartbridge.py”, line 182, in set_value
return self._writer.write(cmd)
AttributeError: ‘NoneType’ object has no attribute ‘write’
’
I searched for a thread that was most recent with my error while I was out. Got home after seeing your fix, did the same thing and it works haha. Thank you!
Have been bothered by the same issue for a few weeks now. HA restart fixes it just for a few days or so.
It seems like once the connection between pylutron and lutron bridge breaks, ha/pylutron does not revive it, and needs a hard restart
I created an issue in GitHub, maybe we’ll get some attention from developers. This is the kind of issue that may be difficult to fix since it is intermittent.
Same issue here. Did you check to see if your certificates expired? ( I have not gotten a chance). Also, my Lutron Android app just updated, so it could be Lutron.