SyntaxError: invalid syntax
2019-04-18 13:31:57 ERROR (MainThread) [homeassistant.components.sensor] asuswrt2: Error on device update!
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 379, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.7/site-packages/homeassistant/util/__init__.py", line 224, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/asuswrt2/sensor.py", line 278, in _update
self._state = get_data_dict(self._connection, _CMD_UPTIME, _REGEX_UPTIME).get(self._id)
File "/config/custom_components/asuswrt2/sensor.py", line 514, in get_data_dict
lines = connection.run_command(cmd_line)
File "/config/custom_components/asuswrt2/sensor.py", line 386, in run_command
from pexpect import pxssh, exceptions
File "/config/deps/lib/python3.7/site-packages/pexpect/__init__.py", line 75, in <module>
from .pty_spawn import spawn, spawnu
File "/config/deps/lib/python3.7/site-packages/pexpect/pty_spawn.py", line 15, in <module>
from .spawnbase import SpawnBase
File "/config/deps/lib/python3.7/site-packages/pexpect/spawnbase.py", line 218
def expect(self, pattern, timeout=-1, searchwindowsize=-1, async=False):
We finished the great migration. All built-in platforms are now in their own folder. This means that if you had a custom component or platform that had the same name as a built-in one, you have to rename it. If you still have platforms in your custom_components/ directory in the old file format, sensor/my_platform.py, rename it to my_platform/sensor.py. It still works but it will not be supported in a future release.