Closed GoState closed 4 years ago
If you look through the issues there are several related to noneType when the code appears to be fetching config values. I have hit this intermittently for many months. Recent updates claimed to have fixed it, and some have reported reverting back to a prior version fixes the issue.
My guess is that something changed related to Python's concurrency model and the config is being accessed before its loaded. But that's a pretty uneducated guess.
@jamescadd Thanks for the suggestion. If the issue was indeed due to the concurrency model of Python, would rolling back to an earlier version of wysesense help? or were you referring to rolling back to a previous version of Python?
I did see some similar comments that thought some components were being called before available. They had just rerun the wysesense.scan, but my error prevents this from even loading so not an option. Wondering if there is a way to delay when wysesense is loaded or accesses the config?
Hmm that's a good question about the delay. I have been wanting to get the VS Code remote debugger setup with my HA instance to try to catch the issue.
Regarding the rollback, it was related to a prior version of this plugin. If you search my comment history you should be able to find the thread.
Sorry I don't have something more helpful, really do want to get this fixed because when it's working the component is really solid.
So I just updated to 114.1 and everything is back to working. Maybe there was a timing fix, saw a couple items about timing but they seemed to be for specific modules/addons...in anycase its back for me now! 👍
System info arch | x86_64 chassis | desktop dev | false docker | true docker_version | 19.03.12 hassio | true host_os | Ubuntu 18.04.4 LTS installation_type | Home Assistant Supervised os_name | Linux os_version | 4.15.0-112-generic python_version | 3.8.3 supervisor | 229 timezone | America/New_York version | 0.113.3 virtualenv | false
Logger: homeassistant.components.binary_sensor Source: custom_components/wyzesense/binary_sensor.py:78 Integration: Binary sensor (documentation, issues) First occurred: 12:58:16 PM (1 occurrences) Last logged: 12:58:16 PM
Error while setting up wyzesense platform for binary_sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.8/asyncio/tasks.py", line 483, in wait_for return fut.result() File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/wyzesense/binary_sensor.py", line 78, in setup_platform _LOGGER.debug("Attempting to open connection to hub at " + config[CONF_DEVICE]) TypeError: can only concatenate str (not "NoneType") to str
Config file entry -- binary_sensor:
I've tried removing the integration from HACS, removing the entry in the config restarting HA then adding them back but this error shows up and I'm not able to call the wysesense.scan service as its not found and all the entities show as unavailable.
Any suggestions much appreciated.