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.
19 lines
309 B
TOML
19 lines
309 B
TOML
[project]
|
|
name = "hasspy"
|
|
version = "0.1.0"
|
|
description = "Home Assistant utility"
|
|
readme = "README.md"
|
|
requires-python = ">=3.13"
|
|
dependencies = [
|
|
"paho-mqtt>=2.1.0",
|
|
"pillow>=11.1.0",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"mypy>=1.15.0",
|
|
"ruff>=0.9.10",
|
|
]
|
|
|
|
[project.scripts]
|
|
hasspy = "hasspy:main"
|