pai icon indicating copy to clipboard operation
pai copied to clipboard

HomeAssistant notifications

Open yozik04 opened this issue 5 years ago • 3 comments

When installed as a hassio plugin it is simple to implement notifications via home assistant. Then users would not need to configure pushover, gsm or pushbullet interfaces.

yozik04 avatar May 07 '20 06:05 yozik04

I have enabled this feature like this:

HOMEASSISTANT_NOTIFICATIONS_ENABLE: true
HOMEASSISTANT_NOTIFICATIONS_NOTIFIER_NAME: notify
HOMEASSISTANT_NOTIFICATIONS_MIN_EVENT_LEVEL: INFO
HOMEASSISTANT_NOTIFICATIONS_EVENT_FILTERS:
  - 'live,alarm,-restore'
  - 'live,trouble,-clock'
  - 'live,tamper'

But I get the following error: ERROR - PAI.paradox.interfaces.text.homeassistant_notifications - Failed to send notification: code=401, text: 401: Unauthorized

Is there any other configuration that needs to be done?

clau-bucur avatar Aug 25 '20 09:08 clau-bucur

I think the SUPERVISOR_TOKEN from the environment variables do not have permission to send notification. There should be a config to enter the token from the config. A long term token can be created by the user to use for notifications.

xhoong avatar Dec 30 '20 04:12 xhoong

When I was trying to implement supervisor token had permission. The main problem here is that our project does not allow hierarchical configuration and it is hard to pass required configuration to form the request without crazy hacks. I am slowly rewriting configuration to yaml, json. No idea when I will finish, but it will definitely be a separate next gen branch of the project.

yozik04 avatar Dec 30 '20 10:12 yozik04