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