Question about alerts

HI
I was wondering if someone could point me to the right direction, Currently i have working Z-Wave JS
and connected 2 devices MultiSensor 6 and Water Sensor 7 Pro and working great
but cant seem to find how to configure alerts, i already configured telegram bot but not sure what guide i should use to configure those two to get alerts to my telegram bot
I see many guide but each guide seems to be different so not sure which to look at

Thank you

Are you talking about the alert integration?

Thanks for the reply,
im trying the example but im getting this error


                    Invalid config for [alert]: required key not provided @ data['alert']['garage_door']['repeat']. Got None. (See /config/configuration.yaml, line 37).
 # Example configuration.yaml entry
alert:
  garage_door:
    name: Garage is open
    done_message: Garage is open
    entity_id: binary_sensor.multisensor_6_home_security_motion_detection
    state: "on"
    skip_first: true
    notifiers:
      - telegram

the entity_id would this right?

Add a “repeat” element. This will be the period at which the alert is repeated.

1 Like

Thanks for the reply so i changed to

# Example configuration.yaml entry
alert:
  garage_door:
    name: Garage is open
    done_message: Garage is open
    entity_id: binary_sensor.multisensor_6_home_security_motion_detection
    state: "on"
    repeat: 30
    skip_first: true
    notifiers:
      - telegram

tested going to the the sensor checked on the webGUI and showed state on but no telegram alert not sure what else i missed?

You have skip first as True, which means the notification will get sent on the second repeat.

So, 30 seconds after the sensor triggers the notification should get sent, if that doesn’t happen then look at your telegram configuration and the home assistant log for errors.

1 Like

Thanks for the reply,
So i was checking if it was a telegram issue on the config but i ran the test and the messages going though


I changed the yaml config

# Example configuration.yaml entry
alert:
  garage_door:
    name: Garage is open
    done_message: Garage is open
    entity_id: binary_sensor.multisensor_6_home_security_motion_detection
    state: "on"
    repeat: 30
    notifiers:
      - telegram

but still cant seem to get the alert
I was checking the logs and found this

homeassistant    | 2022-08-29 23:35:03 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
homeassistant    | Traceback (most recent call last):
homeassistant    |   File "/usr/src/homeassistant/homeassistant/components/alert/__init__.py", line 247, in watched_entity_change
homeassistant    |     await self.begin_alerting()
homeassistant    |   File "/usr/src/homeassistant/homeassistant/components/alert/__init__.py", line 259, in begin_alerting
homeassistant    |     await self._notify()
homeassistant    |   File "/usr/src/homeassistant/homeassistant/components/alert/__init__.py", line 299, in _notify
homeassistant    |     await self._send_notification_message(message)
homeassistant    |   File "/usr/src/homeassistant/homeassistant/components/alert/__init__.py", line 327, in _send_notification_message
homeassistant    |     await self.hass.services.async_call(
homeassistant    |   File "/usr/src/homeassistant/homeassistant/core.py", line 1660, in async_call
homeassistant    |     raise ServiceNotFound(domain, service) from None
homeassistant    | homeassistant.exceptions.ServiceNotFound: Unable to find service notify.telegram

i was able to configure like this

alias: Telgram Alert Motion Site B
description: ''
trigger:
  - platform: state
    entity_id:
      - binary_sensor.multisensor_6_home_security_motion_detection
    from: 'off'
    to: 'on'
condition: []
action:
  - service: telegram_bot.send_message
    data:
      message: Opened Server Site B
mode: single

That means that your problem is that you don’t have a service called notify.telegram.

1 Like