0.106.3: Coronavirus integration (COVID-19), track the outbreak

thanks @DavidFW1960 - so ended up removing all signs of Coronavirus integration and rebooting…

then it allowed me to re-add countries (the country entry did not appear b4).

Now have added a few countries - still same issue with WW 2 sensors.

THanks!

Yeah that PR you linked needs to be merged. For now I just disable those specific sensors.

1 Like

did the WW Deaths sensor also just stop working ??

Working here

0.112.x It’s fixed and all 4 WW sensors are working. (Beta version now)

1 Like

interesting notice the sensors are now showing a 0 and i am still on 0.111.4! :slight_smile:

restored state?

doesnt seem so - just started showing 0 approx 4 hrs ago i think - no reboots

I just updated to 0.112.2 and all my covid entries are unavailable, even after several restarts…

i have seen that also - ended up having to remove all and re add integration

I have since updated to 0.112.3, and now life is good again! :grinning:

humm… whenever i try to add the integration i get this:

Logger: homeassistant.components.coronavirus
Source: helpers/update_coordinator.py:140
Integration: Coronavirus (COVID-19) (documentation, issues)
First occurred: 3:29:49 μ.μ. (1 occurrences)
Last logged: 3:29:49 μ.μ.

Timeout fetching coronavirus data

what goes?

Hi

Did anyone manage to create a sensor to know the actual daily numbers rather than cumulative ? ie daily confirmed cases, daily deaths, etc ?

I saw an automation with variable.coronavirus_united_kingdon_yesterday but Ive tried a couple of ways to do it and not succeded in getting the figure as I am not sure how to create a variable of yesterdays figure

thanks

Martn

+1 I’m also interested in the daily numbers.

Hi @dicko @schumi2004 , here’s how I do daily numbers and display with a custom lovelace card:

Step 1) Install custom hass-variables component, probably with HACS
Step 2) Define variables
Step 3) Make automations to save yesterday’s numbers to variables
(You now have the daily numbers in the variables, you can continue if you want the lovelace card)
Step 4) Install custom text element
Step 5) Add this transparent image to your www/images directory
Step 6) Add lovelace card
Step 7) Remove units on active cases number:
in customize.yaml:

sensor.czechia_coronavirus_current:
unit_of_measurement: 

(Of course, change the name to the name of your sensor.)

Step 8) See if it works with Czech numbers (takes 48 hours to calculate all the numbers)
Step 9) Customize for your country/theme

Et voila:
image

2 Likes

Revamp my corona info…

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - entities:
          - entities:
              - entity: sensor.worldwide_corona_percentage_recovered
                name: Recovered
              - entity: sensor.worldwide_corona_percentage_deceased
                name: Deaths
            entity: sensor.worldwide_corona_percentage_infected
            icon: 'mdi:biohazard'
            name: false
            state_header: Infected
            type: 'custom:multiple-entity-row'
        show_header_toggle: false
        title: Covid Infection Worldwide
        type: entities
  - type: horizontal-stack
    cards:
      - type: glance
        entities:
          - entity: sensor.worldwide_coronavirus_current_dot_separated
            name: Current
            icon: 'mdi:virus'
          - entity: sensor.worldwide_coronavirus_confirmed_dot_separated
            name: Confirmed
            icon: 'mdi:biohazard'
          - entity: sensor.worldwide_coronavirus_deaths_dot_separated
            name: Deaths
            icon: 'mdi:grave-stone'
          - entity: sensor.worldwide_coronavirus_recovered_dot_separated
            name: Recovered
            icon: 'mdi:shield-check'
  - type: horizontal-stack
    cards:
      - type: horizontal-stack
        cards:
          - type: horizontal-stack
            cards:
              - entities:
                  - entity: sensor.worldwide_coronavirus_current
                    color: yellow
                hours_to_show: 48
                points_per_hour: 1
                type: 'custom:mini-graph-card'
                show:
                  state: false
                  name: false
                  icon: false
          - type: horizontal-stack
            cards:
              - entities:
                  - entity: sensor.worldwide_coronavirus_confirmed
                hours_to_show: 48
                points_per_hour: 1
                type: 'custom:mini-graph-card'
                show:
                  state: false
                  name: false
                  icon: false
          - type: horizontal-stack
            cards:
              - entities:
                  - entity: sensor.worldwide_coronavirus_deaths
                    color: red
                hours_to_show: 48
                points_per_hour: 1
                type: 'custom:mini-graph-card'
                show:
                  state: false
                  name: false
                  icon: false
          - type: horizontal-stack
            cards:
              - entities:
                  - entity: sensor.worldwide_coronavirus_recovered
                    color: green
                hours_to_show: 48
                points_per_hour: 1
                type: 'custom:mini-graph-card'
                show:
                  state: false
                  name: false
                  icon: false
  - type: horizontal-stack
    cards:
      - entities:
          - entities:
              - entity: sensor.indonesia_corona_percentage_recovered
                name: Recovered
              - entity: sensor.indonesia_corona_percentage_deceased
                name: Deaths
            entity: sensor.indonesia_corona_percentage_infected
            icon: 'mdi:biohazard'
            name: false
            state_header: Infected
            type: 'custom:multiple-entity-row'
        show_header_toggle: false
        title: Covid Infection indonesia
        type: entities
  - type: horizontal-stack
    cards:
      - type: glance
        entities:
          - entity: sensor.indonesia_coronavirus_current_dot_separated
            name: Current
            icon: 'mdi:virus'
          - entity: sensor.indonesia_coronavirus_confirmed_dot_separated
            name: Confirmed
            icon: 'mdi:biohazard'
          - entity: sensor.indonesia_coronavirus_deaths_dot_separated
            name: Deaths
            icon: 'mdi:grave-stone'
          - entity: sensor.indonesia_coronavirus_recovered_dot_separated
            name: Recovered
            icon: 'mdi:shield-check'
  - type: horizontal-stack
    cards:
      - type: horizontal-stack
        cards:
          - type: horizontal-stack
            cards:
              - entities:
                  - entity: sensor.indonesia_coronavirus_current
                    color: yellow
                hours_to_show: 48
                points_per_hour: 1
                type: 'custom:mini-graph-card'
                show:
                  state: false
                  name: false
                  icon: false
          - type: horizontal-stack
            cards:
              - entities:
                  - entity: sensor.indonesia_coronavirus_confirmed
                hours_to_show: 48
                points_per_hour: 1
                type: 'custom:mini-graph-card'
                show:
                  state: false
                  name: false
                  icon: false
          - type: horizontal-stack
            cards:
              - entities:
                  - entity: sensor.indonesia_coronavirus_deaths
                    color: red
                hours_to_show: 48
                points_per_hour: 1
                type: 'custom:mini-graph-card'
                show:
                  state: false
                  name: false
                  icon: false
          - type: horizontal-stack
            cards:
              - entities:
                  - entity: sensor.indonesia_coronavirus_recovered
                    color: green
                hours_to_show: 48
                points_per_hour: 1
                type: 'custom:mini-graph-card'
                show:
                  state: false
                  name: false
                  icon: false
2 Likes

Nice @KingRichard! Fancy sharing the YAML?

how do i get the new confirmed cases within the last 24h or since the last update (wich is equal cause they update once a day)? i tried using trigger_from wich doesn’t work no do i have a plan to save the actual number becoming yesterdays number to calculate it.

That’s worked for me:

  - platform: statistics
    name: covid
    entity_id: sensor.bulgaria_coronavirus_confirmed
    sampling_size: 20000000
    max_age:
      hours: 43
  - platform: template
    sensors:
      covid_today:
        value_template: '{{ state_attr("sensor.covid","change")|int }}'
        friendly_name: 'CovID today'
1 Like

Tnx Pavel, it works. I didn’t see the possibility to solve this over the statistics, you opened my eyes. greetings, chris