Hi again,
I created a VM with HA from your branch, but I’m still getting the same errors. Not sure what’s going on.
Let me know if/when I should update HA with something from your branch.
I also tried changing line 197 from
hub.session.set_lock_config(device_id, auto_lock_enabled=False)
to HUB.session.set_lock_config(device_id, auto_lock_enabled=False)
(also tried self.session.set_lock_config(device_id, auto_lock_enabled=False)
) but then I get this error:
2019-08-16 16:08:28 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140225954784984] Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/opt/homeassistant/lib64/python3.6/site-packages/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service
connection.context(msg))
File "/opt/homeassistant/lib64/python3.6/site-packages/homeassistant/core.py", line 1150, in async_call
self._execute_service(handler, service_call))
File "/opt/homeassistant/lib64/python3.6/site-packages/homeassistant/core.py", line 1174, in _execute_service
await self._hass.async_add_executor_job(handler.func, service_call)
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/homeassistant/lib64/python3.6/site-packages/homeassistant/components/verisure/__init__.py", line 103, in disable_autolock
HUB.disable_autolock(device_id)
File "/opt/homeassistant/lib64/python3.6/site-packages/homeassistant/components/verisure/__init__.py", line 197, in disable_autolock
HUB.session.set_lock_config(device_id, auto_lock_enabled=False)
File "/opt/homeassistant/lib64/python3.6/site-packages/verisure/session.py", line 394, in set_lock_config
_validate_response(response)
File "/opt/homeassistant/lib64/python3.6/site-packages/verisure/session.py", line 16, in _validate_response
raise ResponseError(response.status_code, response.text)
File "/opt/homeassistant/lib64/python3.6/site-packages/verisure/session.py", line 43, in __init__
self.text = json.loads(text)
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Thanks
//Morten