# CoronaStats Binding

This binding provides the statistic about cases of COVID-19 from the website https://corona-stats.online/ (opens new window).

# Supported Things

This binding supports a world thing, which polls the dataset in an adjustable interval as a bridge and provides the statistics for the whole world. The country thing, representing the statistics for a specified country.

# Discovery

This binding adds a default world thing to the Inbox. This can be used as bridge for country things you may add manually.

# Thing Configuration

# World

Parameter Default Required Description
refresh 30 no Define the interval for polling the data from website in minutes. Minimum is 15 minutes.

# Country

Parameter Default Required Description
countryCode - yes 2-letter code for the country you want to display

For the correct 2-letter country code have a look at the website https://corona-stats.online/ (opens new window)

# Channels

# World and Country

channels type description
cases Number:Dimensionless Total cases
today_cases Number:Dimensionless Increase of total cases today
deaths Number:Dimensionless Deaths
today_deaths Number:Dimensionless Increase of deaths
recovered Number:Dimensionless Recovered cases
active Number:Dimensionless Active cases
critical Number:Dimensionless Critical cases
tests Number:Dimensionless Count of reported tests (country thing only)
updated Number:Dimensionless Data last update time (country thing only)

# Full Example

# Things

Bridge coronastats:world:stats "Corona Stats World" @ "Corona" [refresh=15] {
    Thing country usa "Corona Stats USA" @ "Corona" [countryCode="US"]
    Thing country germany "Corona Stats Germany" @ "Corona" [countryCode="DE"]
    Thing country austria "Corona Stats Austria" @ "Corona" [countryCode="AT"]
    Thing country italy "Corona Stats Italy" @ "Corona" [countryCode="IT"]
    Thing country spain "Corona Stats Spain" @ "Corona" [countryCode="ES"]
    Thing country uk "Corona Stats United Kingdom" @ "Corona" [countryCode="GB"]

# Items

Number:Dimensionless coronaCasesWorld "Total Cases World [%,d]"

Number:Dimensionless coronaDeathsWorld "Deaths World [%,d]"

Number:Dimensionless coronaRecoveredWorld "Recovered Cases World [%,d]"

Number:Dimensionless coronaActiveWorld "Active Cases World [%,d]"

Number:Dimensionless coronaCriticalWorld "Critical Cases World [%,d]"

Number:Dimensionless coronaCasesUSA "Total Cases USA [%,d]"

Number:Dimensionless coronaDeathsUSA "Deaths USA [%,d]"

Number:Dimensionless coronaRecoveredUSA "Recovered Cases USA [%,d]"

Number:Dimensionless coronaActiveUSA "Active Cases USA [%,d]"

Number:Dimensionless coronaCriticalUSA "Critical Cases USA [%,d]"

Number:Dimensionless coronaTestsUSA "Tests USA [%d]"

DateTime coronaUpdatedUSA "Updated USA [%1$tA, %1$td.%1$tm.%1$tY %1$tH:%1$tM]"

# Sitemap

Text label="Corona" {
    Frame label="World" {
        Text item=coronaCasesWorld
        Text item=coronaActiveWorld
        Text item=coronaRecoveredWorld
        Text item=coronaDeathsWorld
        Text item=coronaCriticalWorld
        Text item=coronaTestUSA

    Frame label="USA" {
        Text item=coronaCasesUSA
        Text item=coronaActiveUSA
        Text item=coronaRecoveredUSA
        Text item=coronaDeathsUSA
        Text item=coronaCriticalUSA
        Text item=coronaTestsUSA
        Text item=coronaUpdatedUSA