diff --git a/PKGBUILD b/PKGBUILD index 0cc5645..1a337e8 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -33,4 +33,5 @@ package() { python -m installer --destdir="${pkgdir}" dist/*.whl install -Dm644 config.example.toml "${pkgdir}/etc/${pkgname%-git}/config.toml" install -Dm644 ${pkgname%-git}.service "${pkgdir}/usr/lib/systemd/system/${pkgname%-git}.service" + install -Dm644 icon.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/fr.edgarpierre.hasspy.svg" } diff --git a/hasspy.install b/hasspy.install deleted file mode 100644 index f7f593f..0000000 --- a/hasspy.install +++ /dev/null @@ -1,35 +0,0 @@ -# This is a default template for a post-install scriptlet. -# Uncomment only required functions and remove any functions -# you don't need (and this header). - -## arg 1: the new package version -#pre_install() { - # do something here -#} - -## arg 1: the new package version -#post_install() { - # do something here -#} - -## arg 1: the new package version -## arg 2: the old package version -#pre_upgrade() { - # do something here -#} - -## arg 1: the new package version -## arg 2: the old package version -#post_upgrade() { - # do something here -#} - -## arg 1: the old package version -#pre_remove() { - # do something here -#} - -## arg 1: the old package version -#post_remove() { - # do something here -#} diff --git a/hasspy/mqtt.py b/hasspy/mqtt.py index 2eac87d..33bda54 100644 --- a/hasspy/mqtt.py +++ b/hasspy/mqtt.py @@ -264,7 +264,14 @@ class HassUserClient(HassClient): payload = message.payload.decode("utf-8") log.info(f"Received notification: {payload}") - run_command(["notify-send", payload]) + run_command( + [ + "notify-send", + payload, + "-i", + "/usr/share/icons/hicolor/scalable/apps/fr.edgarpierre.hasspy.svg", + ] + ) @property def availability_topic(self) -> str: diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..b5e47d0 --- /dev/null +++ b/icon.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + +