kevinvincent / ha-wyzesense

A Home Assistant Component to interface with the WYZE Sense hub and sensor system
369 stars 100 forks source link

TypeError: can only concatenate str (not "NoneType") to str #61

Closed teankum closed 4 years ago

teankum commented 4 years ago

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/wyzesense/binary_sensor.py", line 57, in setup_platform _LOGGER.debug("Attempting to open connection to hub at " + config[CONF_DEVICE]) TypeError: can only concatenate str (not "NoneType") to str

teankum commented 4 years ago

I'm using this binary file https://github.com/kevinvincent/ha-wyzesense/blob/master/custom_components/wyzesense/binary_sensor.py

Nighteyez07 commented 4 years ago

I've been getting this same issue Hassio on top of Ubuntu Installed this via the latest version of HACS. I'll pull specific versions of everything when I get back home.

teankum commented 4 years ago

That's the setup I have as well. Hopefully it can get resolved soon.

Nighteyez07 commented 4 years ago

@teankum I got it working, with the following steps

  1. Implemented the code changes from this pending PR https://github.com/kevinvincent/ha-wyzesense/pull/44
  2. Remove the device: "" for the wyzesense platform under binary sensor in your configuration.yml
  3. Unplug and plug back in the Wyze Bridge
  4. Restart Home Assistant and check the logs
Nighteyez07 commented 4 years ago

This issue was causing my HA instance to basically not work at all, once I got it resolved my HA is now super responsive once again.

teankum commented 4 years ago

@Nighteyez07 Did you put the following in your configuration file?

I already had that in my code. Also, are you using the standard binary file or are you using

https://github.com/kevinvincent/ha-wyzesense/blob/cb84cf822d49cee9fc3cb1386bb43e66bb28f17b/custom_components/wyzesense/binary_sensor.py

Nighteyez07 commented 4 years ago

I was using the standard binary installed directly from HACS, but I manually edited the binary_sensor.py with the edits in the PR. Then edited my configuration to completely remove the device: auto line from the wyzesense platform. - platform: wyzsense

teankum commented 4 years ago

@Nighteyez07 I changed the configuration file to binary_sensor:

I am still getting the error. Is your binary file the same as this?

https://github.com/kevinvincent/ha-wyzesense/blob/cb84cf822d49cee9fc3cb1386bb43e66bb28f17b/custom_components/wyzesense/binary_sensor.py

teankum commented 4 years ago

@kevinvincent Do you have a fix for this?

kevinvincent commented 4 years ago

Yes, please update via HACS and set device: "auto" in your config.

dnaphreak commented 4 years ago

Had this same issue using Hassio on top of Debian after updating to version 0.0.6 via HACS. These are the steps that got it working again.

  1. Set device: "auto" in config
  2. Unplug and replug Wyze Bridge
  3. Restart HA instance
jchuck5612 commented 4 years ago

Using version 0.0.6 - I fixed this issue by moving the Wyze bridge from the camera to my Raspberry Pi.

kevinvincent commented 4 years ago

Closing as this has been fixed in 0.0.6