This release repairs the reader-control state path that caused the sensor, select, and number entities to appear unavailable while command buttons still worked.
- Keeps Page, Zoom, Background, Display Mode, and Background Brightness available when GuideVault is reachable but its status endpoint rejects polling.
- Applies successful commands optimistically so Page, Zoom, Display Mode, Background, Brightness, Fullscreen, and reader state update immediately in Home Assistant.
- Reads the current GuideVault 1.3.1 nested
readerstatus payload and its background catalog. - Maps friendly background labels to GuideVault's actual background filenames.
- Rejects false-positive connection tests caused by HTTP 401, 403, or 404 responses.
- Loads control platforms before diagnostic sensors.
- Adds
examples/guidevault-controls-card.yamlwith the requested control order. - Includes
patches/GuideVault-1.3.1-home-assistant-status-token.patchfor authenticated live reader polling.
The command buttons use:
POST /api/home-assistant/command
GuideVault accepts the command token on that route. GuideVault 1.3.1 currently places this status route behind its browser-session middleware:
GET /api/home-assistant/status
Home Assistant has the command token, not the GuideVault browser cookie, so polling receives HTTP 401. The integration can remain usable with cached and optimistic state, but accurate state changes made directly in the GuideVault browser require the bundled server patch.
Copy:
custom_components/guidevault
to:
/config/custom_components/guidevault
Restart Home Assistant, then add or reload:
Settings > Devices & services > GuideVault
Use the GuideVault Command Token in the field labeled GuideVault command token.
From the root of the GuideVault source repository:
git apply --check "C:\Path\To\GuideVault-HomeAssistant-Integration\patches\GuideVault-1.3.1-home-assistant-status-token.patch"
git apply "C:\Path\To\GuideVault-HomeAssistant-Integration\patches\GuideVault-1.3.1-home-assistant-status-token.patch"
dotnet build .\src\Guidevault.Web\Guidevault.Web.csprojThe patch does two things:
- Allows
GET /api/home-assistant/statusthrough the browser-session middleware. - Requires the existing GuideVault command token at the endpoint and removes the token from the returned status object.
After deploying the patched GuideVault build, this PowerShell check should return live JSON:
$GuideVaultUrl = "http://YOUR-GUIDEVAULT-HOST:5478"
$CommandToken = "YOUR-GUIDEVAULT-COMMAND-TOKEN"
Invoke-RestMethod `
-Uri "$GuideVaultUrl/api/home-assistant/status" `
-Headers @{ Authorization = "Bearer $CommandToken" }Use:
examples/guidevault-controls-card.yaml
It lists:
- Background
- Display Mode
- Page
- Zoom
- First Page
- Last Page
- Next Page
- Previous Page
- Focus Fullscreen
- Toggle Overlay
- Zoom In
- Zoom Out
- Close Reader
- Background Brightness
Home Assistant does not provide integrations with a cross-domain sort property for the native device page, so its UI may regroup selects, numbers, and buttons. The bundled dashboard card is the reliable way to preserve the exact order.
Existing installations may retain button.guidevault_fullscreen as the entity ID after its displayed name changes to Focus Fullscreen. Replace that one line in the example card when necessary.
The integration exposes:
- Currently reading
- Reader state
- Content type
- Page
- Page count
- Zoom
- Display mode
- Background
- Background brightness
- Fullscreen
- Version
The Currently reading entity includes diagnostic attributes:
live_status_availablestatus_sourcestatus_errorstatus_endpoint
When status_source is live, values came from GuideVault. When it is cached_fallback or optimistic, the server is reachable but live status polling still needs correction.
The integration creates:
- Background select
- Display Mode select
- Page number
- Zoom number
- Background Brightness slider
- First Page
- Last Page
- Next Page
- Previous Page
- Focus Fullscreen
- Toggle Overlay
- Zoom In
- Zoom Out
- Close Reader
Examples:
action: guidevault.next_pageaction: guidevault.go_to_page
data:
page: 12action: guidevault.set_zoom
data:
zoom: 125action: guidevault.set_display_mode
data:
display_mode: "2 page"action: guidevault.set_background
data:
background: "librarydesk.png"action: guidevault.set_background_brightness
data:
background_brightness: 72The repository remains HACS-compatible. Add it as a custom repository of type Integration when it is not already installed.