Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in System Log uppon start-up #11

Open
WorldOfMaze opened this issue Jul 24, 2022 · 2 comments
Open

Error in System Log uppon start-up #11

WorldOfMaze opened this issue Jul 24, 2022 · 2 comments

Comments

@WorldOfMaze
Copy link

I have installed the repository via HACS, created the sensor, checked the config, and restart HASS. I am getting two errors:

Logger: homeassistant.components.sensor
Source: /usr/local/lib/python3.10/asyncio/events.py:80
Integration: Sensor (documentation, issues)
First occurred: 4:09:42 PM (1 occurrences)
Last logged: 4:09:42 PM

Setup of sensor platform apsystems is taking over 10 seconds.

and

Logger: homeassistant.components.sensor
Source: custom_components/apsystems/sensor.py:207
Integration: Sensor (documentation, issues)
First occurred: 4:09:34 PM (5 occurrences)
Last logged: 4:09:43 PM

apsystems: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 446, in _async_add_entity 
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 702, in async_device_update
    await task
  File "/config/custom_components/apsystems/sensor.py", line 146, in async_update
    ap_data = await self._fetcher.data()
  File "/config/custom_components/apsystems/sensor.py", line 253, in data
    await self.run()
  File "/config/custom_components/apsystems/sensor.py", line 221, in run
    browser = await self.login()
  File "/config/custom_components/apsystems/sensor.py", line 207, in login
    browser.select_form(nr=0)
  File "/usr/local/lib/python3.10/site-packages/mechanize/_mechanize.py", line 628, in select_form
    raise BrowserStateError("not viewing HTML")
mechanize._mechanize.BrowserStateError: not viewing HTML

Any ideas how to fix this?

Thanks.

@skelgaard
Copy link

your using an outdated version, use my forked version instead of this one

@WorldOfMaze
Copy link
Author

Thank you, @skelgaard. Once I updated the sensor, everything works like a champ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants