Skip to content

Home Assistant integration

Devices and entities

Each pairing creates a config subentry and a separate HA device. Its area provides room context. Platforms are assist_satellite, camera, optional media_player, sensor, binary_sensor, switch, number, select and button. Run-time settings use EntityCategory.CONFIG, diagnostic values use EntityCategory.DIAGNOSTIC.

RustyHAMA profile management

Control channel

/api/rustyhama/v1/device/ws is an authenticated, versioned WebSocket. Messages contain version, ID, device, type, timestamp, revision and payload. Application heartbeats, session generations, ACK/timeout, deduplication, bounded queues and jittered reconnect prevent zombie sessions and duplicate actions. Voice, camera and media streams are separate under /api/rustyhama/v1/device/streams/{session_id}.

HA actions

Action Important fields
rustyhama.send_notification device_id, title, message, duration_ms, icon
rustyhama.set_active_tab device_id, tab_id or index
rustyhama.set_screensaver device_id, state (on, off, toggle)
rustyhama.reload_configuration device_id

Voice announcements use standard assist_satellite.announce actions and media uses normal media_player actions. Notifications appear as an overlay while visible and as an Android system notification in the background. Offline actions are not replayed late; only desired state and latest configuration converge.

History and server compilation

History, calendar and weather are bounded request/result operations. Dashboard compilation resolves Auto Entities registry filters, sorting and static selection in HA and produces a narrow list of required entity states. Changes to relevant states trigger recompilation. Provider secrets and a general HA user token never reach the device.