Commit graph

3 commits

Author SHA1 Message Date
df841c70cb
Refactor code structure for improved readability and maintainability
All checks were successful
Build and push Archlinux package / build (push) Successful in 26s
pre-commit / pre-commit (push) Successful in 59s
2025-05-05 20:38:10 +02:00
e54223e361
feat: Add cover art support for user client
This commit adds support for displaying cover art from the currently playing media in the Home Assistant user client.

- The `HassUserClient` now publishes cover art to the `user/image/cover` MQTT topic.
- The `publish_cover` method uses `playerctl` to retrieve the art URL and `pillow` to convert the image to WebP format before publishing.
- The `components` property now includes an `image` component for cover art.
- The `cover` attribute on `HassUserClient` is used to avoid resending the same cover multiple times.
- The `publish_state` method has been extended to spawn a thread for updating the cover.
2025-03-09 18:51:38 +01:00
fa8bb1d8a9
Initialize hasspy project with basic structure and MQTT client implementation 2025-03-08 23:39:33 +01:00