Coronavirus Notification Automation Question

Hi

What have I done wrong that is not letting me get a notification when the UK Confirmed Cases increase to my mobile ?

Thanks

Martyn

- id: Coronavirus Update UK
  alias: Coronavirus Confirmed Cases Increase in UK
  trigger:
  - platform: state
    to: 'triggered'
    entity_id: sensor.uk_coronavirus_confirmed
  - service: notify.mobile_app_martyn
    data_template:
      title: Coronavirus has increase in UK
      message: Total Number of confirmed cases in UK is now {{ states.sensor.uk_coronavirus_confirmed.state
        }} at {{now().strftime('%H:%M %d-%m-%Y')}}.

Try the following:

- id: Coronavirus Update UK
  alias: Coronavirus Confirmed Cases Increase in UK
  trigger:
  - platform: numeric_state
    above: 0
    entity_id: sensor.uk_coronavirus_confirmed
  - service: notify.mobile_app_martyn
    data_template:
      title: Coronavirus has increase in UK
      message: Total Number of confirmed cases in UK is now {{ states('sensor.uk_coronavirus_confirmed') }} at {{now().strftime('%H:%M %d-%m-%Y')}}.

Thanks for the quick reply but getting this even before I have done anything now

Martyn

Apologies, just tested the execute and it works but it just shows errors. Ill see how it goes and see if it updates tomorrow

Thanks

Sorry.

- id: Coronavirus Update UK
  alias: Coronavirus Confirmed Cases Increase in UK
  trigger:
  - platform: numeric_state
    above: 0
    entity_id: sensor.uk_coronavirus_confirmed
  action:
  - service: notify.mobile_app_martyn
    data_template:
      title: Coronavirus has increase in UK
      message: Total Number of confirmed cases in UK is now {{ states('sensor.uk_coronavirus_confirmed') }} at {{now().strftime('%H:%M %d-%m-%Y')}}.

1 Like

Thank you very much. That is working great now.

Martyn

This is weird. My integration doesn’t have the word coronavirus in it. It just is sensor.uk_confirmed etc.

I set this up and it’s no longer working. It triggered once or twice and ever since number are increasing but it’s not triggering