From 03f0916e7cc9b1f0eded498c8d6f68f4cc26e5a8 Mon Sep 17 00:00:00 2001 From: tbertonatti Date: Thu, 23 Jun 2022 16:02:48 -0300 Subject: [PATCH] Add embed image parameter for Discord notify (#73474) --- homeassistant/components/discord/notify.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homeassistant/components/discord/notify.py b/homeassistant/components/discord/notify.py index 299919472cf..d97ce7042bc 100644 --- a/homeassistant/components/discord/notify.py +++ b/homeassistant/components/discord/notify.py @@ -27,6 +27,7 @@ ATTR_EMBED_FIELDS = "fields" ATTR_EMBED_FOOTER = "footer" ATTR_EMBED_TITLE = "title" ATTR_EMBED_THUMBNAIL = "thumbnail" +ATTR_EMBED_IMAGE = "image" ATTR_EMBED_URL = "url" ATTR_IMAGES = "images" @@ -94,6 +95,8 @@ class DiscordNotificationService(BaseNotificationService): embed.set_author(**embedding[ATTR_EMBED_AUTHOR]) if ATTR_EMBED_THUMBNAIL in embedding: embed.set_thumbnail(**embedding[ATTR_EMBED_THUMBNAIL]) + if ATTR_EMBED_IMAGE in embedding: + embed.set_image(**embedding[ATTR_EMBED_IMAGE]) embeds.append(embed) if ATTR_IMAGES in data: