In the end the data comes from some site with devices and sensors. Check whether your local authority has one near you and whether you can read it directly or via a local service.
I’m based in the UK and I was using tomorrow.io but that was often telling me that pollen was low when it was high and my eyes were burning. I am now using BBC weather data - sadly BBC doesn’t provide API to get it so you have to use scraper - it is all nicely explained on this guy’s website: speaktothegeek.co.uk
Interesting thanks. But I thought scraping on HA has been deprecated?
Core integrations are no longer allowed to use scraping. You can however use the Scrape component (or Multiscrape through HACS).
Custom components can still use scraping.
could you please share the code?
Which part do you want, the lights or the notifications?
Right. The United States is not the only country that exists in the world, despite what it may think.
How do you set up a RESTful sensor? Also, where did you get your location code from? It is very difficult to find Canadian pollen data anywhere that I can pull into HA. Does this actually work? Thanks so much for your help!
Thank you, is that all I need? I’m not familiar with REST sensors.
Hi there, me again. Sorry, I’ve read through the posts, and I’ve input the same location data as you indicated because I live in downtown Toronto so it should be the same as Pearson I am guessing.
I put in my config:
- platform: rest
resource: https://www.theweathernetwork.com/api/data/caon0696
name: weather_network
json_attributes:
- obs
- swo
value_template: 'OK'
scan_interval:
minutes: 160
- platform: template
sensors:
weather_network_pollen_index:
value_template: '{{ states.sensor.weather_network.attributes["obs"]["pollen_index"] }}'
friendly_name: 'Pollen Index'
weather_network_pollen_name:
value_template: '{{ states.sensor.weather_network.attributes["obs"]["pollen_name"] }}'
friendly_name: 'Pollen Risk Type'
weather_network_uv_index:
value_template: '{{ states.sensor.weather_network.attributes["obs"]["uv_label"] }}'
friendly_name: 'UV Index'
weather_network_air_quality:
value_template: '{{ states.sensor.weather_network.attributes["obs"]["aq_level"] }}'
friendly_name: 'Air Quality'
weather_network_temperature:
value_template: '{{ states.sensor.weather_network.attributes["obs"]["t"] }}'
friendly_name: 'Temperature (Weather Network)'
device_class: temperature
unit_of_measurement: '°C'
weather_network_swo_level:
value_template: '{{ states.sensor.weather_network.attributes["swo"]["swo_level"] }}'
friendly_name: 'Severe Weather Risk Level'
weather_network_swo_type:
value_template: '{{ states.sensor.weather_network.attributes["swo"]["swo_type"] }}'
friendly_name: 'Severe Weather Risk Type'
and then I put in my dashboard:
- type: custom:auto-entities
filter:
include:
- entity_id: states.sensor.weather_network.attributes
show_empty: false
card:
type: vertical-stack
cards:
- type: entities
entities:
- type: attribute
entity: states.sensor.weather_network.attributes
attribute: pollen_index
name: Pollen
icon: mdi:tree-outline
style:
top: 85%
left: 50.9%
width: 20%
card_mod:
style: |
ha-card {
card-background-color: rgba(1,1,1,0);
--card-background-color: rgba(1,1,1,0);
--ha-card-background-color: rgba(1,1,1,0);
font-size: 11px;
--primary-text-color: rgba(255,255,255,1);
--secondary-text-color: rgba(255,255,255,1);
more-info-header-background: rgba(255,255,255,0);
secondary-background-color: rgba(1,1,1,0);
}
style:
top: 85%
left: 50.9%
width: 20%
card_mod:
style: |
ha-card {
card-background-color: rgba(1,1,1,0);
--card-background-color: rgba(1,1,1,0);
--ha-card-background-color: rgba(1,1,1,0);
font-size: 11px;
--primary-text-color: rgba(255,255,255,1);
--secondary-text-color: rgba(255,255,255,1);
more-info-header-background: rgba(255,255,255,0);
secondary-background-color: rgba(1,1,1,0);
}
I did it with the auto-entities because I am using a picture-elements dashboard.
But I don’t see any values showing up. I’ve played around with the sensor data a bit but haven’t managed to get anything to work. Is there another step I am missing or can you share how you are displaying the data?
Hello,
I’ve read through these posts, and I’ve input the location data as indicated (I live in downtown Toronto, so the code should be the same as in the other post above).
I’m wondering if you can tell me, what I am doing wrong?
From what I can tell, I needed to put the following in my config:
- type: custom:auto-entities
filter:
include:
- entity_id: states.sensor.weather_network.attributes
show_empty: false
card:
type: vertical-stack
cards:
- type: entities
entities:
- type: attribute
entity: states.sensor.weather_network.attributes
attribute: pollen_index
name: Pollen
icon: mdi:tree-outline
style:
top: 85%
left: 50.9%
width: 20%
card_mod:
style: |
ha-card {
card-background-color: rgba(1,1,1,0);
--card-background-color: rgba(1,1,1,0);
--ha-card-background-color: rgba(1,1,1,0);
font-size: 11px;
--primary-text-color: rgba(255,255,255,1);
--secondary-text-color: rgba(255,255,255,1);
more-info-header-background: rgba(255,255,255,0);
secondary-background-color: rgba(1,1,1,0);
}
style:
top: 85%
left: 50.9%
width: 20%
card_mod:
style: |
ha-card {
card-background-color: rgba(1,1,1,0);
--card-background-color: rgba(1,1,1,0);
--ha-card-background-color: rgba(1,1,1,0);
font-size: 11px;
--primary-text-color: rgba(255,255,255,1);
--secondary-text-color: rgba(255,255,255,1);
more-info-header-background: rgba(255,255,255,0);
secondary-background-color: rgba(1,1,1,0);
}
and then I put in my dashboard:
- type: custom:auto-entities
filter:
include:
- entity_id: states.sensor.weather_network.attributes
show_empty: false
card:
type: vertical-stack
cards:
- type: entities
entities:
- type: attribute
entity: states.sensor.weather_network.attributes
attribute: pollen_index
name: Pollen
icon: mdi:tree-outline
style:
top: 85%
left: 50.9%
width: 20%
card_mod:
style: |
ha-card {
card-background-color: rgba(1,1,1,0);
--card-background-color: rgba(1,1,1,0);
--ha-card-background-color: rgba(1,1,1,0);
font-size: 11px;
--primary-text-color: rgba(255,255,255,1);
--secondary-text-color: rgba(255,255,255,1);
more-info-header-background: rgba(255,255,255,0);
secondary-background-color: rgba(1,1,1,0);
}
style:
top: 85%
left: 50.9%
width: 20%
card_mod:
style: |
ha-card {
card-background-color: rgba(1,1,1,0);
--card-background-color: rgba(1,1,1,0);
--ha-card-background-color: rgba(1,1,1,0);
font-size: 11px;
--primary-text-color: rgba(255,255,255,1);
--secondary-text-color: rgba(255,255,255,1);
more-info-header-background: rgba(255,255,255,0);
secondary-background-color: rgba(1,1,1,0);
}
I did it with the auto-entities because I am using a picture-elements dashboard.
But I don't see any values showing up. I've played around with the sensor data a bit but haven't managed to get anything to work. Is there another step I am missing or can you share how you are displaying the data?
I did it with the auto-entities because I am using a picture-elements dashboard.
But I don’t see any values showing up. I’ve played around with the sensor data a bit but haven’t managed to get anything to work. Is there another step I am missing or can you share how you are displaying the data? I’m not as familiar with these types of sensors.
Thanks very much for your time if you can spare it. This seems a bit tricker than some of the other things I’ve worked on in Home Assistant.
Any chance you can share this? I found tomorrow.io covers my area as well. Curious to cost though, might need to register and find out.
Tomorrow.io is not an option anymore. Apparently they didn’t like hobbyists using their platform so they shuffled around their data into paid tiers.
To get access to the pollen information you’d now have to shell out over 6000 euros a year. And that is just the pollen information.
Avoid them at all costs.