hasspy/.pre-commit-config.yaml
Edgar P. Burkhart 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

23 lines
590 B
YAML

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/isort
rev: 6.0.1
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.10
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
hooks:
- id: mypy
args: [--strict]
additional_dependencies: [paho-mqtt, pillow]