bernikr / lovelace-notify-card

Send notifications directly from the dashboard
MIT License
45 stars 16 forks source link

How to "Notify Discord" #10

Closed Coolie1101 closed 2 months ago

Coolie1101 commented 2 years ago

The service "notify.discord" requires additional entry "target", I configured the card as below, but it doesn't seem to work.

Card Config

type: custom:notify-card
target: discord
data:
  target: 'xxxxxxxxxxxxxxxx'
card_title: Notify Discord
notification_title:
  input: Title

HA Service Call

service: notify.discord
data:
  title: Test
  message: Testing
  target: 'xxxxxxxxxxxxxxxxxx'

HA Error Log

Logger: homeassistant.components.discord.notify
Source: components/discord/notify.py:77
Integration: Discord ([documentation](https://www.home-assistant.io/integrations/discord), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+discord%22))
First occurred: 6:36:54 PM (6 occurrences)
Last logged: 6:52:19 PM

No target specified
bernikr commented 2 months ago

I've updated the card to be able to work with any action/service and any data now.

Please update the card and try the following config:

type: custom:notify-card
notification_title:
  input: Title
action: notify.discord
data:
  message: $MSG
  title: $TITLE
  target: 'xxxxxxxxxxxxxxxxxx'