Pollen information

Since there is no component for pollen in sweden i would like some help to get data from this url:
https://pollenkoll.se/wp-content/themes/pollenkoll/api/get_cities.php

The specifik city i want data from is Göteborg. I am only looking for pollen as is the first part.

{
“cityid”:84,
“date_mod”:“2018-02-13 19:39:39”,
“name”:“G\u00f6teborg”,
“latitude”:“57.708870”,
“longitude”:“11.974560”,
“regionid”:332,
“region_url”:“https://pollenkoll.se/har-finns-hjalp-mot-pollenallergi-i-vastra-gotaland/”,
“pollen”:[
{
“type”:“Al”,
“day0_value”:“i.u.”,
“day0_desc”:“ingen uppgift”,
“day0_name”:“Tisdag”,
“day0_date”:“2018-02-13”,
“day0_relative_date”:“Idag”,
“day1_value”:“i.u.”,
“day1_desc”:“ingen uppgift”,
“day1_name”:“Onsdag”,
“day1_date”:“2018-02-14”,
“day1_relative_date”:“Imorgon”,
“day2_value”:“i.u.”,
“day2_desc”:“ingen uppgift”,
“day2_name”:“Torsdag”,
“day2_date”:“2018-02-15”,
“day2_relative_date”:"\u00d6vermorgon",
“day3_value”:“i.u.”,
“day3_desc”:“ingen uppgift”,
“day3_name”:“Fredag”,
“day3_date”:“2018-02-16”,
“day3_relative_date”:“Fredag”
},
{
“type”:“Alm”,
“day0_value”:“i.u.”,
“day0_desc”:“ingen uppgift”,
“day0_name”:“Tisdag”,
“day0_date”:“2018-02-13”,
“day0_relative_date”:“Idag”,
“day1_value”:“i.u.”,
“day1_desc”:“ingen uppgift”,
“day1_name”:“Onsdag”,
“day1_date”:“2018-02-14”,
“day1_relative_date”:“Imorgon”,
“day2_value”:“i.u.”,
“day2_desc”:“ingen uppgift”,
“day2_name”:“Torsdag”,
“day2_date”:“2018-02-15”,
“day2_relative_date”:"\u00d6vermorgon",
“day3_value”:“i.u.”,
“day3_desc”:“ingen uppgift”,
“day3_name”:“Fredag”,
“day3_date”:“2018-02-16”,
“day3_relative_date”:“Fredag”
},
{
“type”:“Bj\u00f6rk”,
“day0_value”:“i.u.”,
“day0_desc”:“ingen uppgift”,
“day0_name”:“Tisdag”,
“day0_date”:“2018-02-13”,
“day0_relative_date”:“Idag”,
“day1_value”:“i.u.”,
“day1_desc”:“ingen uppgift”,
“day1_name”:“Onsdag”,
“day1_date”:“2018-02-14”,
“day1_relative_date”:“Imorgon”,
“day2_value”:“i.u.”,
“day2_desc”:“ingen uppgift”,
“day2_name”:“Torsdag”,
“day2_date”:“2018-02-15”,
“day2_relative_date”:"\u00d6vermorgon",
“day3_value”:“i.u.”,
“day3_desc”:“ingen uppgift”,
“day3_name”:“Fredag”,
“day3_date”:“2018-02-16”,
“day3_relative_date”:“Fredag”
},
{
“type”:“Bok”,
“day0_value”:“i.u.”,
“day0_desc”:“ingen uppgift”,
“day0_name”:“Tisdag”,
“day0_date”:“2018-02-13”,
“day0_relative_date”:“Idag”,
“day1_value”:“i.u.”,
“day1_desc”:“ingen uppgift”,
“day1_name”:“Onsdag”,
“day1_date”:“2018-02-14”,
“day1_relative_date”:“Imorgon”,
“day2_value”:“i.u.”,
“day2_desc”:“ingen uppgift”,
“day2_name”:“Torsdag”,
“day2_date”:“2018-02-15”,
“day2_relative_date”:"\u00d6vermorgon",
“day3_value”:“i.u.”,
“day3_desc”:“ingen uppgift”,
“day3_name”:“Fredag”,
“day3_date”:“2018-02-16”,
“day3_relative_date”:“Fredag”
},
{
“type”:“Ek”,
“day0_value”:“i.u.”,
“day0_desc”:“ingen uppgift”,
“day0_name”:“Tisdag”,
“day0_date”:“2018-02-13”,
“day0_relative_date”:“Idag”,
“day1_value”:“i.u.”,
“day1_desc”:“ingen uppgift”,
“day1_name”:“Onsdag”,
“day1_date”:“2018-02-14”,
“day1_relative_date”:“Imorgon”,
“day2_value”:“i.u.”,
“day2_desc”:“ingen uppgift”,
“day2_name”:“Torsdag”,
“day2_date”:“2018-02-15”,
“day2_relative_date”:"\u00d6vermorgon",
“day3_value”:“i.u.”,
“day3_desc”:“ingen uppgift”,
“day3_name”:“Fredag”,
“day3_date”:“2018-02-16”,
“day3_relative_date”:“Fredag”
},
{
“type”:“Gr\u00e4s”,
“day0_value”:“i.u.”,
“day0_desc”:“ingen uppgift”,
“day0_name”:“Tisdag”,
“day0_date”:“2018-02-13”,
“day0_relative_date”:“Idag”,
“day1_value”:“i.u.”,
“day1_desc”:“ingen uppgift”,
“day1_name”:“Onsdag”,
“day1_date”:“2018-02-14”,
“day1_relative_date”:“Imorgon”,
“day2_value”:“i.u.”,
“day2_desc”:“ingen uppgift”,
“day2_name”:“Torsdag”,
“day2_date”:“2018-02-15”,
“day2_relative_date”:"\u00d6vermorgon",
“day3_value”:“i.u.”,
“day3_desc”:“ingen uppgift”,
“day3_name”:“Fredag”,
“day3_date”:“2018-02-16”,
“day3_relative_date”:“Fredag”
},
{
“type”:“Gr\u00e5bo”,
“day0_value”:“i.u.”,
“day0_desc”:“ingen uppgift”,
“day0_name”:“Tisdag”,
“day0_date”:“2018-02-13”,
“day0_relative_date”:“Idag”,
“day1_value”:“i.u.”,
“day1_desc”:“ingen uppgift”,
“day1_name”:“Onsdag”,
“day1_date”:“2018-02-14”,
“day1_relative_date”:“Imorgon”,
“day2_value”:“i.u.”,
“day2_desc”:“ingen uppgift”,
“day2_name”:“Torsdag”,
“day2_date”:“2018-02-15”,
“day2_relative_date”:"\u00d6vermorgon",
“day3_value”:“i.u.”,
“day3_desc”:“ingen uppgift”,
“day3_name”:“Fredag”,
“day3_date”:“2018-02-16”,
“day3_relative_date”:“Fredag”
},
{
“type”:“Hassel”,
“day0_value”:“i.u.”,
“day0_desc”:“ingen uppgift”,
“day0_name”:“Tisdag”,
“day0_date”:“2018-02-13”,
“day0_relative_date”:“Idag”,
“day1_value”:“i.u.”,
“day1_desc”:“ingen uppgift”,
“day1_name”:“Onsdag”,
“day1_date”:“2018-02-14”,
“day1_relative_date”:“Imorgon”,
“day2_value”:“i.u.”,
“day2_desc”:“ingen uppgift”,
“day2_name”:“Torsdag”,
“day2_date”:“2018-02-15”,
“day2_relative_date”:"\u00d6vermorgon",
“day3_value”:“i.u.”,
“day3_desc”:“ingen uppgift”,
“day3_name”:“Fredag”,
“day3_date”:“2018-02-16”,
“day3_relative_date”:“Fredag”
},
{
“type”:“S\u00e4lg / vide”,
“day0_value”:“i.u.”,
“day0_desc”:“ingen uppgift”,
“day0_name”:“Tisdag”,
“day0_date”:“2018-02-13”,
“day0_relative_date”:“Idag”,
“day1_value”:“i.u.”,
“day1_desc”:“ingen uppgift”,
“day1_name”:“Onsdag”,
“day1_date”:“2018-02-14”,
“day1_relative_date”:“Imorgon”,
“day2_value”:“i.u.”,
“day2_desc”:“ingen uppgift”,
“day2_name”:“Torsdag”,
“day2_date”:“2018-02-15”,
“day2_relative_date”:"\u00d6vermorgon",
“day3_value”:“i.u.”,
“day3_desc”:“ingen uppgift”,
“day3_name”:“Fredag”,
“day3_date”:“2018-02-16”,
“day3_relative_date”:“Fredag”
}
],
“weather”:{
“query”:{
“count”:1,
“created”:“2018-02-13T19:40:15Z”,
“lang”:“en-US”,
“results”:{
“channel”:{
“units”:{
“distance”:“km”,
“pressure”:“mb”,
“speed”:“km/h”,
“temperature”:“C”
},
“title”:“Yahoo! Weather - Gothenburg, Vastra Gotaland, SE”,
“link”:“http://us.rd.yahoo.com/dailynews/rss/weather/Country__Country/*https://weather.yahoo.com/country/state/city-12885203/”,
“description”:“Yahoo! Weather for Gothenburg, Vastra Gotaland, SE”,
“language”:“en-us”,
“lastBuildDate”:“Tue, 13 Feb 2018 08:40 PM CET”,
“ttl”:“60”,
“location”:{
“city”:“Gothenburg”,
“country”:“Sweden”,
“region”:" Vastra Gotaland"
},
“wind”:{
“chill”:“28”,
“direction”:“190”,
“speed”:“17.70”
},
“atmosphere”:{
“humidity”:“94”,
“pressure”:“34134.81”,
“rising”:“0”,
“visibility”:“18.83”
},
“astronomy”:{
“sunrise”:“7:46 am”,
“sunset”:“5:8 pm”
},
“image”:{
“title”:“Yahoo! Weather”,
“width”:“142”,
“height”:“18”,
“link”:“http://weather.yahoo.com”,
“url”:“http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif
},
“item”:{
“title”:“Conditions for Gothenburg, Vastra Gotaland, SE at 08:00 PM CET”,
“lat”:“57.70969”,
“long”:“11.97579”,
“link”:“http://us.rd.yahoo.com/dailynews/rss/weather/Country__Country/*https://weather.yahoo.com/country/state/city-12885203/”,
“pubDate”:“Tue, 13 Feb 2018 08:00 PM CET”,
“condition”:{
“code”:“26”,
“date”:“Tue, 13 Feb 2018 08:00 PM CET”,
“temp”:“0”,
“text”:“Cloudy”
},
“forecast”:[
{
“code”:“28”,
“date”:“13 Feb 2018”,
“day”:“Tue”,
“high”:“1”,
“low”:“0”,
“text”:“Mostly Cloudy”
},
{
“code”:“30”,
“date”:“14 Feb 2018”,
“day”:“Wed”,
“high”:“2”,
“low”:“0”,
“text”:“Partly Cloudy”
},
{
“code”:“26”,
“date”:“15 Feb 2018”,
“day”:“Thu”,
“high”:“1”,
“low”:"-1",
“text”:“Cloudy”
},
{
“code”:“16”,
“date”:“16 Feb 2018”,
“day”:“Fri”,
“high”:“2”,
“low”:“0”,
“text”:“Snow”
},
{
“code”:“28”,
“date”:“17 Feb 2018”,
“day”:“Sat”,
“high”:“3”,
“low”:“0”,
“text”:“Mostly Cloudy”
},
{
“code”:“28”,
“date”:“18 Feb 2018”,
“day”:“Sun”,
“high”:“2”,
“low”:"-1",
“text”:“Mostly Cloudy”
},
{
“code”:“23”,
“date”:“19 Feb 2018”,
“day”:“Mon”,
“high”:“2”,
“low”:“0”,
“text”:“Breezy”
},
{
“code”:“30”,
“date”:“20 Feb 2018”,
“day”:“Tue”,
“high”:“3”,
“low”:“0”,
“text”:“Partly Cloudy”
},
{
“code”:“30”,
“date”:“21 Feb 2018”,
“day”:“Wed”,
“high”:“0”,
“low”:"-2",
“text”:“Partly Cloudy”
},
{
“code”:“28”,
“date”:“22 Feb 2018”,
“day”:“Thu”,
“high”:“1”,
“low”:"-2",
“text”:“Mostly Cloudy”
}
],
“description”:"<![CDATA[\n
\nCurrent Conditions:<\/b>\n
Cloudy\n
\n
\nForecast:<\/b>\n
Tue - Mostly Cloudy. High: 1Low: 0\n
Wed - Partly Cloudy. High: 2Low: 0\n
Thu - Cloudy. High: 1Low: -1\n
Fri - Snow. High: 2Low: 0\n
Sat - Mostly Cloudy. High: 3Low: 0\n
\n
\nFull Forecast at Yahoo! Weather<\/a>\n
\n
\n
\n]]>",
“guid”:{
“isPermaLink”:“false”
}
}
}
}
}
}
}

1 Like

And if there are some Norwegian developer with asthma or pollen allergies, with some spare time, a pollen sensor from this XML-feed, would be nice.

http://www.pollenvarslingen.no/Temasider/Presse_media/Enkeltbruk.aspx

1 Like

https://github.com/JohNan/home-assistant-pollenkoll

5 Likes

Works great, thanks alot.

1 Like

Hi, this sensor has stopped working. Is their a replacement?

It works for me…

1 Like

Where should i put the pollenkoll.py file? I have added the file under custom_components.

and under sensor.yaml

  • platform: pollenkoll
    sensors:
    • city: Göteborg
      state: Gräs

48

Error:
ModuleNotFoundError: No module named ‘custom_components.pollenkoll.sensor’; ‘custom_components.pollenkoll’ is not a package
2019-03-19 17:14:31 ERROR (MainThread) [homeassistant.loader] Unable to find platform pollenkoll. Search path was limited to path of component: custom_components

Try this custom_components/pollenkoll/sensor.py

2 Likes

Awesome! Worked perfectly :slight_smile:

I made a custom card to go with this awesome component. Can be found here: https://github.com/isabellaalstrom/pollenkoll-card?fbclid=IwAR1WHd1atlh7aIwS9cTG2KrrsjKgo7OMJwwNLQzoM20YKUzQscuH_rFFoYU

Looks like this:
image

or this, with the minimal option set to true:
image

4 Likes

Hi all

the sensor dont update for me. only time it updates is if I reboot the Pi.
this is my first custom_compontes script so I don’t know if I need to do anything to get it to work.

All settings are default, only Stockholm as city.
homassistent owns the dir’s and files.
Using hassbian 0.91.2

/Niclas

It’s looking great, nice work!

I’ve tried to us it but I cant get it to work.
Error

Custom element doesn’t exist: pollenkoll-card

Lovelace

resources:
  - url: /local/plugins/card-modder.js?v=1
    type: js
  - url: /local/pollenkoll-card/pollenkoll-card.js
    type: js

The files are located in

  • config/www/plugins/card-modder.js?v=1
  • config/custom_components/pollenkoll-card/pollenkoll-card.js
    I’ve tried different url’s but it will not work, same error.

The card needs to be in the www folder. And I don’t know about the card modder, but it’s card-tools that’s needed for the card.

1 Like

Hi all – wanted to give everyone a proactive heads up that in the next major release, the pollen sensor platform is getting converted into the iqvia component (which will come with several new sensors):

All you will have to do is change your schema from this:

sensor:
  - platform: pollen
  # ...

…to this:

iqvia:
  # ...

Will that work in sweden as well as this custom component does?

Ah, sorry, I thought this thread was for the pollen sensor platform. Carry on. :smile:

2 Likes

Hi!

Thanks for a super nice sensor, i got it all working but i have a problem with the lovelace card.
@teachingbirds do you know why i dont get the icons? This is how it looks for me:
pollen

Im on HA version 0.92.2

Thanks
Fredric

Its probably the images that’s in the wrong directory. The development of this is put on hold until further notice.

After upgrading to 0.93 and making the above change on the pollen sensor, Home Assistant will not restart. No messages in the log, was there something else I need to do?

Nothing else to do. My 0.93.0 with the iqvia integration loaded immediately, so I’d guess there’s something else going on with your HASS overall.