My Corona Virus card

How do you get the numbers at the state level? I’m in NY so looking for that info. Nice job! Looks great!

** Figured it out. Thank you. Card looks Awesome**

Sorry, I didn’t get a notification for some reason.
My heart goes out to New York. Stay safe.

For others: Replace “Alabama” in the scrape sensors resource with your state.

- platform: rest
  resource: "https://services1.arcgis.com/0MSEUqKaxRlEPj5g/arcgis/rest/services/ncov_cases/FeatureServer/1/query?f=json&where=(Country_Region%3D%27US%27)%20AND%20(Province_State%20LIKE%20%27%25Alabama%27)&outStatistics=%5B%7B%22statisticType%22%3A%22sum%22%2C%22onStatisticField%22%3A%22Confirmed%22%2C%22outStatisticFieldName%22%3A%22Confirmed%22%7D%2C%20%7B%22statisticType%22%3A%22sum%22%2C%22onStatisticField%22%3A%22Deaths%22%2C%22outStatisticFieldName%22%3A%22Deaths%22%7D%2C%20%7B%22statisticType%22%3A%22sum%22%2C%22onStatisticField%22%3A%22Recovered%22%2C%22outStatisticFieldName%22%3A%22Recovered%22%7D%5D"
  name: Coronavirus Alabama confirmed
  value_template: "{{ value_json.features[0].attributes.Confirmed }}"
  json_attributes_path: "$.features[0].attributes"
  unit_of_measurement: "Confirmed"
  json_attributes:
    - Confirmed
    - Deaths
    - Recovered
- platform: rest
  resource: "https://services1.arcgis.com/0MSEUqKaxRlEPj5g/arcgis/rest/services/ncov_cases/FeatureServer/1/query?f=json&where=(Country_Region%3D%27US%27)%20AND%20(Province_State%20LIKE%20%27%25Alabama%27)&outStatistics=%5B%7B%22statisticType%22%3A%22sum%22%2C%22onStatisticField%22%3A%22Confirmed%22%2C%22outStatisticFieldName%22%3A%22Confirmed%22%7D%2C%20%7B%22statisticType%22%3A%22sum%22%2C%22onStatisticField%22%3A%22Deaths%22%2C%22outStatisticFieldName%22%3A%22Deaths%22%7D%2C%20%7B%22statisticType%22%3A%22sum%22%2C%22onStatisticField%22%3A%22Recovered%22%2C%22outStatisticFieldName%22%3A%22Recovered%22%7D%5D"
  name: Coronavirus Alabama deaths
  value_template: "{{ value_json.features[0].attributes.Deaths }}"
  json_attributes_path: "$.features[0].attributes"
  unit_of_measurement: "Deaths"
  json_attributes:
    - Confirmed
    - Deaths
    - Recovered
3 Likes

Thanks. You too. One question. The second chart on the left that you can toggle the different views. It doesn’t work in the HA ios app. Only works on my windows machine. Is it flash or something?

It may be a browser thing. I’m using Chrome on my phone and PC.

Yeah. Doesn’t work on iphone using chrome either. Weird. Just says Not Fully Configured

I guess you cleared the cache. Try it outside of HA?

Hhhm. Direct link to arcgis site works on iphone. On my surface pro it works properly inside of HA.

Is it possible to just have the line chart show updates once per day?

Just curious did you put these rest platforms under sensors?

gdreelin
yes. I use separate files, so in sensors.yaml

shaikmonster
The mini-graph card has an update_interval option that should do the trick.

Thanks for that information. Love your card setup!

Question on the bar card. Your shows the bars fully filled but when I did it, it showed them partly filled. I setup the state one like you had and changed it to Virginia. I get the readings from the REST sensors but it will not display. I even got the county map like you had for Virginia to replace the Alabama one. In addition the COVID map below that always comes up with the default screen not the map is there a way to fix it to map only?

gdreelin
Partially filled is correct. I did not have it configured correctly in the initial post. You want to see a percentage of the max for current, deaths and recovered in the bars.

You can find help on the scrape setup here: Help with Corona Scrape Sensor

I haven’t found a way to start that site at any other location.

BTW I edited the code a few times. I vertically centered the text in the bars and fixed a mouseover issue among other things. You may want to update yours.

I really wanted the numbers to be in the upper left part of the mini-graph and came up with an ugly kludge to get it done in the unit entry. It doesn’t scale with page width at all. If anyone knows the proper way to do this, I’m all ears.

Bmorgan,

Thanks for the help. I was able to get the map to show up in the edit phase but once I saved it, it disappeared so just going to play with it until it works. The two titles to the left (confirmed) and right (death) are overlapping the map how do you move those out some? I changed a lot of settings to get it to move but only ended up moving the “Virginia Infected” part which I needed to do as well.

gdreelin
I just made the image smaller till if fit

background-size: 20%;

Love that funny that is what I ended up doing… Thanks

I don’t suppose someone can help me with this error for the covid code above?

Expected a value of type {entity,name,icon} | entity-id for entities.0.align_header but received "center".

This is my covid-19 page for som countries :slight_smile: