Custom Component: Discord status and game sensor

Looking for some examples as well. Its possible to add to lovelace with the Entity or Entities card, but it seems like it can only show one attribute for each user.

Yeah some examples would be great, I got it to show state on some discord users, but how to display games etc


+1 :grinning:

Hello all!
I have just released a new version that introduces separate sensors for every tracked information.
This version also introduces use of config flow and can be configured only from Home Assistant Integrations Dashboard.

1 Like

really nice, thank you for your effort

@lordBoos I was running the previous version (using yaml) to get user status and it worked great. I could see when friends were online.

#- platform: discord_game
#  token: OTk0MTxdxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxZ11meQBE
#  image_format: webp            # optional, available formats are: png, webp, jpeg, jpg
#  members:
#    - 71186xxxxxxxxxxx6295
#    - 5154xxxxxxxxxxxx4138
#    - 716xxxxxxxxxxx333390
#    - 2665xxxxxxxxxxx 9312

Moving to the new version, I disabled the yaml (restarted) and entered the bot token successfully via the UI but it it not showing any entities ?

Note: The bot was added to the channel with admin permissions

Any ideas on what I have done wrong?

Hello @Andrew123.
Have you selected the users in the second step of the configuration flow? Do you have any errors in the home assistant log?
I have not been able to reproduce your issue, it might be specific to your setup so any errors in the log should give us better understanding of the problem.

EDIT: I see, that your screenshot is of the Discord integration (the official HA one) and not the Discord game integration. You might have accidentally used that instead of Discord game integration. The official integration can only send messages to Discord channels and cannot track users.

1 Like

Thankyou ! I was using the wrong integration.

I feel rather silly for that mistake - but grateful you could help me.

Thakyou again for that.

i have a question: you can create channel entities. what are they good for? The voice channels have a “last user” attribute, which, like the status, is actually always “unknown”.
Is that correct?
Why can I also monitor text channels? is there a way to record “commands” or messages from the channel in an event?

That monitors who last added reaction to a message in a channel. We used it instead of polls (before discord added them) and had google home voice notification when somebody voted.

is there a way to read the messages which are send in a channel or is there only the option to read who added a reaction?

You cannot read the message. Who added the last reaction is in “last user” attribute.

oh what a pity, it would be cool to receive the messages as an “event” like with the snmp integration

It’s not really a fit for this integration, it’s purpose is mainly to read what games users are playing. But I’ll add it to todo-list for future release, but not necessarily the next one.