Is it possible to configure the Coronavirus integration to go down to US - State level?

Unfortunately I don’t have Node Red installed so that’s a little too much effort for me right now :slight_smile:
But thanks for the info I may be able to find time in future to work on it.

You can get Node Red running in no time. If you’re running a HASSIO installation: Install node red from Supervisor and Node Red companion component using HACS. You are then good to go.

This is how my output looks like in HA:
image

Thanks, I am on an old school hassbian install. I plan to move my install from rpi to server so maybe then I will also convert to hassio if not too complicate to move it all over.

Also just realized this doesn’t get me down to the state level. I already have US level data using the existing integration. Was just wondering if I can get down to my state. Hawaii currently has only 2 confirmed cases so I would like to place an alert on when this data changes.

Comment Removed.

7 Likes

Hi,

Copied and pasted your code but I’m getting an error:
Invalid config for [sensor.rest]: [json_attributes_path] is an invalid option for [sensor.rest]. Check: sensor.rest->json_attributes_path. (See ?, line ?).

Thanks for this! I was struggling to find any documentation around the REST support for that data source. Your code worked as posted for me!

1 Like

Comment Removed.

Great, marked as solution. Do you know how frequently this platform updates? There doesn’t seem to be an option for setting how frequently to poll.

Comment Removed.

Thanks, that is interesting, I didn’t realize entities can have feature attributes not documented, that seems a little confusing. Maybe it would be good to link that page on entities that adhere to the options.
I did actually search for scan_interval and found the page you linked but I didn’t realize it would apply to the restful sensors. The note that the options are being phased out also made me think they perhaps didn’t apply.

I am trying to figure out how to handle “undefined” state. I think the site is probably overwhelmed at times so it fails then the sensor state becomes undefined. This triggers my change of state automation.

I could add conditions to my change of state automation to ignore from undefined or to undefined changes but then I could miss an update if it changes from 2 to undefined and then changes to 3 for example I wouldn’t get triggered.

So I would prefer to ignore state changes to undefined somehow. Perhaps this can be done in the value_template somehow I am just not sure how to get the current value to return that when undefined is found…doing more research to figure this out.

@ Silicon_Avatar: How did you figure out that url?
Tried with DE, but did not work. AND: Is it possible, to dig more into it i.e. on a City level?

At this url, the data is available for cities, but it seems not to be actual…

Comment Removed.

Does anyone know how to get the COUNTY level data in the US?

Anyone know how to get the active count for a state? I can get confirmed, recovered and deaths but I can’t seem to find current/active. The API used above seems to return 0 for the US and all states.

Did you figure out how to get the county-level data? I’ve been working on this and can’t figure it out.

Yes. The solution by Petro here worked for me: Help with Corona Scrape Sensor

Awesome! Thanks. I got it working by following Petro’s instructions.

Thank you for posting this. Took me a while to figure out how to do the multiple sensors. Got it now.