From be7ec3495fdeb0a475008fad6948951c6ca19710 Mon Sep 17 00:00:00 2001 From: Christian Kauer Date: Sun, 14 Nov 2021 11:52:07 +0100 Subject: [PATCH] add: Covid 19 sensors --- entities/sensors/covid19.yaml | 14 ++++++++++++++ integrations/sensors.yaml | 3 +++ 2 files changed, 17 insertions(+) create mode 100644 entities/sensors/covid19.yaml create mode 100644 integrations/sensors.yaml diff --git a/entities/sensors/covid19.yaml b/entities/sensors/covid19.yaml new file mode 100644 index 0000000..77f2e61 --- /dev/null +++ b/entities/sensors/covid19.yaml @@ -0,0 +1,14 @@ +# https://npgeo-corona-npgeo-de.hub.arcgis.com/datasets/917fc37a709542548cc3be077a786c17_0/api + + +- platform: rest + name: Corona_100k_olpe + resource: "https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=BL%20%3D%20%27NORDRHEIN-WESTFALEN%27%20AND%20GEN%20%3D%20%27OLPE%27&outFields=*&outSR=4326&f=json" + value_template: '{{ value_json.features[0].attributes.cases7_per_100k | float | round(0) }}' + scan_interval: 3600 + +- platform: rest + name: Corona_cases_olpe + resource: "https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=BL%20%3D%20%27NORDRHEIN-WESTFALEN%27%20AND%20GEN%20%3D%20%27OLPE%27&outFields=*&outSR=4326&f=json" + value_template: '{{ value_json.features[0].attributes.cases | float | round(0) }}' + scan_interval: 3600 \ No newline at end of file diff --git a/integrations/sensors.yaml b/integrations/sensors.yaml new file mode 100644 index 0000000..fdef4d2 --- /dev/null +++ b/integrations/sensors.yaml @@ -0,0 +1,3 @@ +# https://www.home-assistant.io/integrations/sensor/ + +sensor: !include_dir_merge_list ../entities/sensors \ No newline at end of file