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

Integration not working for Winterthur #59

Open
schneich opened this issue Apr 10, 2022 · 3 comments
Open

Integration not working for Winterthur #59

schneich opened this issue Apr 10, 2022 · 3 comments

Comments

@schneich
Copy link

schneich commented Apr 10, 2022

I tried so many dirrent things, but I cannot get this integration running for "8400 Winterthur". All the sonsors are always unavailable/null.
Could someone plase help? Can anybody confirm, that there are temperature, humidity and due point sensors for Winterthur available? If yes, what do I need to do?

(My last, unsucessfull try was this: posted by @scottgerring in #54 (comment)

@schneich
Copy link
Author

schneich commented Apr 10, 2022

This is the corresponding log after a reboot:

2022-04-10 20:29:37 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration meteo-swiss which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-04-10 20:30:00 WARNING (MainThread) [homeassistant.setup] Setup of zone is taking over 10 seconds.
2022-04-10 20:30:00 WARNING (MainThread) [homeassistant.setup] Setup of input_boolean is taking over 10 seconds.
2022-04-10 20:30:00 WARNING (MainThread) [homeassistant.setup] Setup of input_number is taking over 10 seconds.
2022-04-10 20:30:00 WARNING (MainThread) [homeassistant.setup] Setup of counter is taking over 10 seconds.
2022-04-10 20:30:00 WARNING (MainThread) [homeassistant.setup] Setup of timer is taking over 10 seconds.
2022-04-10 20:30:01 WARNING (MainThread) [homeassistant.setup] Setup of input_select is taking over 10 seconds.
2022-04-10 20:30:02 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform meteo-swiss
Traceback (most recent call last):
File "/config/custom_components/meteo-swiss/sensor.py", line 82, in state
return self._data['condition'][0][dataId]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 801, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 553, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 590, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 559, in _stringify_state
if (state := self.state) is None:
File "/config/custom_components/meteo-swiss/sensor.py", line 84, in state
_LOGGER.debug("Unable to return data for : %s"%(self._data['condition'][0][dataId]))
IndexError: list index out of range
2022-04-10 20:30:02 ERROR (MainThread) [homeassistant.components.weather] Error adding entities for domain weather with platform meteo-swiss
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 801, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 553, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 590, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 559, in _stringify_state
if (state := self.state) is None:
File "/config/custom_components/meteo-swiss/weather.py", line 95, in state
cond = next(
File "/config/custom_components/meteo-swiss/weather.py", line 99, in
if int(symbolId) in v
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
2022-04-10 20:30:02 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up meteo-swiss platform for sensor
Traceback (most recent call last):
File "/config/custom_components/meteo-swiss/sensor.py", line 82, in state
return self._data['condition'][0][dataId]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 257, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 801, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 553, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 590, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 559, in _stringify_state
if (state := self.state) is None:
File "/config/custom_components/meteo-swiss/sensor.py", line 84, in state
_LOGGER.debug("Unable to return data for : %s"%(self._data['condition'][0][dataId]))
IndexError: list index out of range
2022-04-10 20:30:02 ERROR (MainThread) [homeassistant.components.weather] Error while setting up meteo-swiss platform for weather
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 257, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 801, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 553, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 590, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 559, in _stringify_state
if (state := self.state) is None:
File "/config/custom_components/meteo-swiss/weather.py", line 95, in state
cond = next(
File "/config/custom_components/meteo-swiss/weather.py", line 99, in
if int(symbolId) in v
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

@scottgerring is this related to your coding or something which is coming from the original integration?

@scottgerring
Copy link
Contributor

Hi @schneich you can go see which stations there are on the meteoswiss website - if you click "More Info", you can get the abbreviation you need to set up the integration.

For the postcode I'd use 8404 as it seems to yield a forecast when you ask for it - not sure if the difference is important here, haven't dug into how meteoswiss model everything, just tried to fix the breaking API changes.

@schneich
Copy link
Author

Hi @scottgerring thank you very much for your response. Well, there are some PLZs around Winterthur providing forcast data. I am more interested in current weather conditions, so that I could do some automations in HomeAssistant.
For Winterthur, there seems to be only current temperature, no humidity, no dewpoint. I will try the neigouring villages and see, if I can find something there. Or I just build my own weather station to get the current values just outside our cellar window. :-)

thanks anyway, your help is very much appreciated.

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