Simple CDC Covid Community Status

Hi Everyone,
Have another contribution for the community. I’ve figured out how to get the CDC’s Community Risk level into a rest sensor in HA, and have Rhasspy tell me what the level is in my County.
First, create a rest sensor:

  - platform: rest
    scan_interval: 43200
    resource: https://data.cdc.gov/resource/3nnm-4jni.json?county_fips=XXXXX
    method: GET
    name: Covid Status for your county
    value_template: "{{ value_json[-1].covid_19_community_level }}"
    force_update: true

Look up your County’s FIPS number via this site, and place it where the “XXXXX” are in my example:
https://www.nrcs.usda.gov/wps/portal/nrcs/detail/national/home/?cid=nrcs143_013697

Create your sentences and train Rhasspy:

[CovidStatus]
what the covid status
what is the latest covid status [for] [your county]
what is the covid level [in] [your county]

Create an intent in HA (look up what HA is calling your sensor and put that in the intent after ({{states("sensor. ):

  CovidStatus:
    action:
    - service: mqtt.publish
      data_template:
        topic: hermes/tts/say
        payload_template: '{"text": "the center for disease control has stated that in Your County there is a ({{states("sensor.covid_status_for_your_county")}}) level of risk for covid", "siteId": "default", "lang": null, "id": "", "sessionId": "", "volume": 1.0}'

Reboot HA, and ask Rhasspy for your Covid status. Stay safe everyone.
Jeff

1 Like