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

HA 0.117.0b0 #2

Open
bussio opened this issue Oct 23, 2020 · 10 comments
Open

HA 0.117.0b0 #2

bussio opened this issue Oct 23, 2020 · 10 comments

Comments

@bussio
Copy link

bussio commented Oct 23, 2020

Since HA 0.117b0 your integration no longer works. I get the following error message:

Logger: homeassistant.components.sensor
Source: custom_components/dwd_pollen/sensor.py:123
Integration: Sensor (documentation, issues)
First occurred: 13:45:03 (1 occurrences)
Last logged: 13:45:03

Error while setting up dwd_pollen platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 193, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/dwd_pollen/sensor.py", line 82, in setup_platform
api = DwdPollenAPI(partregion_ids)
File "/config/custom_components/dwd_pollen/sensor.py", line 116, in init
self.update()
File "/usr/src/homeassistant/homeassistant/util/init.py", line 239, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/dwd_pollen/sensor.py", line 123, in update
self._rest.update()
AttributeError: 'RestData' object has no attribute 'update'

@ChrisPiel70
Copy link

Hallo, I get the same Error in HA 0.117.0

ERROR (MainThread) [homeassistant.components.sensor] Error while setting up dwd_pollen platform for sensor
Traceback (most recent call last):
File "/srv/homeassistant_38/lib/python3.8/site-packages/homeassistant/helpers/entity_platform.py", line 197, in _async_setup_platform
await asyncio.shield(task)
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/dwd_pollen/sensor.py", line 84, in setup_platform
api = DwdPollenAPI(partregion_ids)
File "/home/homeassistant/.homeassistant/custom_components/dwd_pollen/sensor.py", line 118, in init
self.update()
File "/srv/homeassistant_38/lib/python3.8/site-packages/homeassistant/util/init.py", line 239, in wrapper
result = method(*args, **kwargs)
File "/home/homeassistant/.homeassistant/custom_components/dwd_pollen/sensor.py", line 125, in update
self._rest.update()
AttributeError: 'RestData' object has no attribute 'update'

@monotonus
Copy link

Same here with 0.117.1

@marcschumacher Are you still supporting this? HACS implementation would be great also :)

@marcschumacher
Copy link
Owner

Sure do, sorry for not replying. I am currently working on reimplementing this adding to HACS or even core including frontend configuration. Stand by.

@ChrisPiel70
Copy link

@marcschumacher
Super news! Its not Pollen time so take your time to do it right.

@blubbel42
Copy link

blubbel42 commented Jan 4, 2021

I also ran into this Problem (made a big update from 117 on python3.7 to 2020.12 an python 3.9), With a bit of help i found out it seems to be caused by restdata now beeing async and the component not.
If you want a fast fix while we are waiting for the rework, I did the following:

Line 20, add:
import asyncio

in def init, add another None in the following line (must be 4 None now):
self._rest = RestData('GET', resource, None, None, None, None, True)

and with def update this needs to be done:
#XXX self._rest.update()
asyncio.run( self._rest.async_update())

Still does not solve the problem with non-numeric values for tomorrow-data in the early hours of the day

edit: found a way to attach patchfile as a Zip. So: heres the patch

Greetings

Blubbel

sensor.py.zip

@bussio
Copy link
Author

bussio commented Feb 26, 2021

sensor.py.zip

How please did I apply this under macOS?

Greetings

@blubbel42
Copy link

Hello, this is nothing that is dependent on the OS, The zip just contains the .diff file which can be used with the "patch" command in a terminal.
You need to find the sensor.py file of pollensensor and change it like described above, But i would not recommend to use it anymore. it broke again 2 weeks again. Today i use the fork of @obelix05 (he did a pull request in this git, that's how i found it)
Greetings Blubbel

@Jpsy
Copy link

Jpsy commented Feb 28, 2021

Just a reminder that for those of you who are using Node RED in HA there is a simple and rock solid replacement for any custom extensions. It will read the DWD Pollen index and create HA entities from it. It will not break and if needed you can fine tune all the details of the created entities yourself.
See https://community.home-assistant.io/t/new-custom-component-dwd-pollen-sensor-deutscher-wetterdienst-german-weather-service/117362/9

@monotonus
Copy link

Sure do, sorry for not replying. I am currently working on reimplementing this adding to HACS or even core including frontend configuration. Stand by.

How is the progress here?

@Liese2007
Copy link

I never Receiver any Feedback or have seen any appearance of Marc anywhere. So I think this pollen_dwd Sensor is permanently down.
Unfortunately I am not a friend of NODE RED.

Regards
Jörg

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

7 participants