Sending Alert with HTML5 doesn't work

Hi all,

I have set up the following alert:

testalert:
  title        : Test Alert
  name         : This is a test message
  done_message : Message is done
  entity_id    : input_boolean.test_input
  state        : 'on'
  repeat       : 3
  skip_first   : false
  notifiers:
    - notify.chrome_notifier

My HTML5 notifier looks like this:

notify:
  - platform      : html5
    name          : chrome_notifier
    vapid_pub_key : xxx
    vapid_prv_key : xxx
    vapid_email   : xxx

The error message I get when I trigger the alert is:

2019-08-08 09:45:04 INFO (MainThread) [homeassistant.components.alert] Alerting: This is a test message
2019-08-08 09:45:04 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/alert/__init__.py", line 237, in watched_entity_change
    await self.begin_alerting()
  File "/usr/src/homeassistant/homeassistant/components/alert/__init__.py", line 249, in begin_alerting
    await self._notify()
  File "/usr/src/homeassistant/homeassistant/components/alert/__init__.py", line 288, in _notify
    await self._send_notification_message(message)
  File "/usr/src/homeassistant/homeassistant/components/alert/__init__.py", line 316, in _send_notification_message
    await self.hass.services.async_call(DOMAIN_NOTIFY, target, msg_payload)
  File "/usr/src/homeassistant/homeassistant/core.py", line 1210, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service notify/notify.chrome_notifier

The strange thing is that when I go to the Developer Tools -> Services, and I choose the service notify.chrome_notifier it works normally. I get a message on all my configured devices.

When I reconfigure my Alert to only alert a specific device, I get the exact same error message:

2019-08-08 10:09:55 INFO (MainThread) [homeassistant.components.alert] Alerting: This is a test message
2019-08-08 10:09:55 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/alert/__init__.py", line 237, in watched_entity_change
    await self.begin_alerting()
  File "/usr/src/homeassistant/homeassistant/components/alert/__init__.py", line 249, in begin_alerting
    await self._notify()
  File "/usr/src/homeassistant/homeassistant/components/alert/__init__.py", line 288, in _notify
    await self._send_notification_message(message)
  File "/usr/src/homeassistant/homeassistant/components/alert/__init__.py", line 316, in _send_notification_message
    await self.hass.services.async_call(DOMAIN_NOTIFY, target, msg_payload)
  File "/usr/src/homeassistant/homeassistant/core.py", line 1210, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service notify/notify.chrome_notifier_stefan_laptop

Can anyone give me some idea how to solve this? Thanks!

Sorry, I just found the problem.
I needed to remove the notify. like this:

testalert:
  title        : Test Alert
  name         : This is a test message
  done_message : Message is done
  entity_id    : input_boolean.test_input
  state        : 'on'
  repeat       : 3
  skip_first   : false
  notifiers:
    - chrome_notifier

Unrelated, but I really like your alignment.

It’s never crossed my mind to do that but it sure makes for a clean layout. :sunglasses: