Harden RelayTV integration and prepare HACS 0.4.0 (#2)

* docs: add Home Assistant 0.4.0 hardening roadmap

* fix: protect media credentials and resume state

* feat: authenticate RelayTV API operations

* fix: make targeting and media state reliable

* test: add Home Assistant integration CI

* fix: validate API credentials during setup

* release: prepare HACS 0.4.0

* fix: align pytest dependency pin

* fix: close URL sanitizer gaps and correct player state reporting

Sync the sensitive-query-key list with the RelayTV server (adds auth,
exp, jwt, X-Emby-Token, X-Jellyfin-Token), filter query credentials
from relative URLs instead of returning them verbatim, and preserve
brackets around IPv6 literal hosts.

Also report volume on RelayTV's 0-100 scale unconditionally (a raw 1
is 1%, not full volume) and give the coordinator its own
position_updated_at stamp — the base DataUpdateCoordinator has no
last_update_success_time, so media_position_updated_at silently fell
back to now() on every read and the seek bar never extrapolated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 21:08:54 -05:00
committed by GitHub
co-authored by Claude Fable 5
parent 4faa1a1f34
commit f2bf565623
28 changed files with 1321 additions and 191 deletions
+22 -2
View File
@@ -7,13 +7,33 @@
"description": "Add a RelayTV server reachable from Home Assistant.",
"data": {
"base_url": "RelayTV server address",
"server_name": "Name"
"server_name": "Name",
"api_token": "API token (optional)"
}
},
"reauth_confirm": {
"title": "Update RelayTV authentication",
"description": "Enter the API token configured on the RelayTV server.",
"data": {
"api_token": "API token"
}
},
"reconfigure": {
"title": "Reconfigure RelayTV",
"description": "Update the RelayTV connection and authentication settings.",
"data": {
"base_url": "RelayTV server address",
"server_name": "Name",
"api_token": "API token (optional)"
}
}
},
"error": {
"missing_base_url": "Please enter a RelayTV base URL.",
"invalid_base_url": "Enter a valid HTTP or HTTPS RelayTV base URL without credentials, query parameters, or a fragment.",
"missing_name": "Please enter a name.",
"cannot_connect": "Unable to connect to RelayTV.",
"invalid_auth": "The RelayTV API token was rejected.",
"unknown": "Unexpected error while connecting to RelayTV.",
"already_configured": "This RelayTV server is already configured."
}
},