Skip to content

Track The Deadly Coronavirus Outbreak using Home Assistant

Me scared by the Coronavirus cover-19 threat

This Home Assistant Coronavirus video article is not meant to spread fear.

It is not meant to make you feel more anxious or panic than you already are, because I know a lot of us are feeling that way at the moment.

I’m like one of the most not watching the TV news person on the planet and now even I started to feel a little bit like: “what the heck is going on here?”. 

For sure the situation is serious and there has been a lot of tragedy that’s come along with this, but currently more people annually are dying from Tsetse flies than from the Coronavirus and don’t even look at the mosquitoes statistics.

Annual average number of deaths worldwide caused by:

  1. Mosquitoes: 2 million
  2. Other Humans: 475,000
  3. Snakes: 50,000
  4. Sand flies: 25,000
  5. Tsetse flies: 10,000
  6. Coronavirus (COVID-19): 8,000
  7. Crocodiles: 1,000
  8. Hippos: 500
  9. Elephants: 100
  10. Lions: 100
  11. Sharks: 10
  12. Wolves: 10
Coronavirus (COVID-19) virus under microscope

I’m not trying to neglect the Coronavirus threat, I just hope that the COVID-19 will stay in this range forever.

I know that there’s a lot of information out there right now and some media over exaggerating the problem BIG TIME for the rating they will get.

And if you are a bit like me and don’t watch these medias too much you are probably only interested in the real facts.

Home Assistant Coronavirus

I will show you how to add the Coronavirus integration in Home Assistant which will allow you to track the outbreak without turning on your TV.

The Home Assistant Coronavirus integration tracks the number of people that are confirmed with, recovered from, and died by the virus in your country or worldwide.

So, let’s go:

Docker Client Installation

If you already have working Home Assistant that is up and running – you can skip these sections below and directly go to Adding the Home Assistant Coronavirus integration.

Otherwise go to https://www.docker.com and download the docker package for your Operating System.

Installed Docker Client

Install it, run it and create an Docker ID if needed.

Home Assistant installation using Docker

If you are Windows user – use Windows Explorer to create a folder instead of executing the mkdir command below.

If you are using Mac or Linux you can use the commands below as is.

Open a Terminal and create a folder somewhere on your computer:

mkdir /YOUR_PATH_HERE/haconfig

Start Home Assistant using Docker:

docker run -it -p 8123:8123 -v /YOUR_PATH_HERE/haconfig/:/config homeassistant/home-assistant:latest

When the above command finish its execution. You can open the following address in a new browser or tab.

http://localhost:8123
Home Assistant Initial Setup Screen

You should be greeted by the Home Assistant initial setup screen.

Create an user, choose your location and you are good to go to the next section.

Adding the Home Assistant Coronavirus integration

Have in mind these three things:

The Coronavirus integration can be configured via the Home Assistant frontend.

  • Go to Configuration -> Integrations.
  • Click on the + in the bottom right corner to add a new integration.
Adding the Home Assistant Coronavirus integration

Search and select the Coronavirus integration form the list.

  • Follow the instruction on screen to add the sensors. Either choose for adding world-wide sensors, or a specific set of sensors for your country.

If you want to track both world-wide and one or more countries at the same time, you can repeat the configuration process described above to add multiple instances of the integration.

Select Worldwide or specific Country to track the Coronavirus Outbreak
Select Worldwide or specific Country to track the Coronavirus Outbreak

Add Coronavirus ENTITIES card in Home Assistant

To create a card using the Home Assistant Coronavirus sensor data:

Go to Home Assistant “Overview” menu, then in the upper right corner click on the dots menu.

Choose “Configure UI” button and click on the + in the bottom right corner to add a new ENTITIES card.

Add all needed Coronavirus sensors as Entities using the dropdown menus as shown in the picture below.

Configuration of the ENTITIES card to use Coronavirus sensor data
Configuration of the ENTITIES card

Alternatively you can click on the “SHOW CODE EDITOR” and paste the following text to track the Worldwide and US Coronavirus data:

 type: entities
 entities:
   - entity: sensor.us_coronavirus_confirmed
   - entity: sensor.us_coronavirus_current
   - entity: sensor.us_coronavirus_deaths
   - entity: sensor.us_coronavirus_recovered
   - entity: sensor.worldwide_coronavirus_confirmed
   - entity: sensor.worldwide_coronavirus_current
   - entity: sensor.worldwide_coronavirus_deaths
   - entity: sensor.worldwide_coronavirus_recovered 

Now let’s make this to look a little bit different and prettier if that is even possible for a virus data concerning peoples life .

Add Coronavirus GLANCE card in Home Assistant

Repeat the same procedure you did with the ENTITIES card as follow:

Go to Home Assistant “Overview” menu, then in the upper right corner click on the dots menu.

Choose “Configure UI” button and click on the + in the bottom right corner.

Adding GLANCE card in Home Assistant to fill it with Coronavirus data

This time add a new GLANCE card.

Click on the “SHOW CODE EDITOR” and paste the following text to track the Worldwide Coronavirus outbreak data. Of course you can adapt this to your needs/Country.

 show_icon: true
 show_name: true
 show_state: true
 title: Worldwide
 type: glance
 entities:
   - entity: sensor.worldwide_coronavirus_confirmed
     icon: 'mdi:emoticon-neutral-outline'
     name: Confirmed
   - entity: sensor.worldwide_coronavirus_current
     icon: 'mdi:emoticon-frown-outline'
     name: Current
   - entity: sensor.worldwide_coronavirus_recovered
     icon: 'mdi:emoticon-happy-outline'
     name: Recovered
   - entity: sensor.worldwide_coronavirus_deaths
     icon: 'mdi:emoticon-dead-outline'
     name: Deaths 

If everything is right you should see something similar at the end:

Track The Deadly Coronavirus Outbreak using Home Assistant 1

And I hope these number stays the same

Question for You:

I have a quick question for you:

What is the current situation with the Coronavirus in your country at the moment?

Here for example only food stores, pharmacies and gas stations are working. Let me know your answers in the comments section below.

Support my work:

Any sort of engagement on this website or my YouTube channel does really help out a lot with the Google and YouTube algorithm, so make sure you hit the subscribe, Like and Bell buttons If you enjoy this video article.

Also feel free to add me on Twitter by searching for @KPeyanski

Come and say Hi on my Discord server: https://invite.gg/kpeyanski

I really hope that you find this information useful and you now know how track the Coronavirus outbreak from within Home Assistant.

Thank you for reading/watching, wash your hands often, stay safe and see you next time.

Leave a Reply

Your email address will not be published. Required fields are marked *