Home Assistant integration is done via [MQTT Discovery][0]. The application publishes configuration to a special topic, which Home Assistant receives and uses to create entities and optionally assign them to devices. To start with, we're exposing two entites to Home Assistant for each attached monitor: one for the current URL and one for the current title of the window. The URL is exposed as a "text" sensor, which allows the state to be changed directly; when the state changes, the new value is puoblished to the "command" topic and thus triggering a navigation. Since the client can only have a single "will" message, every entity will be marked as available/unavailable together. This is probably not an issue, but it does make it impossible to indicate a monitor is no longer attached. Note: for some reason, the will message doesn't seem to get sent when the client disconnects. I am not sure why... [0]: https://www.home-assistant.io/docs/mqtt/discovery/ |
||
---|---|---|
src | ||
.gitattributes | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
rustfmt.toml |