StreamDeck HomeAssistant
A Rust library for integrating Elgato Stream Deck devices with Home Assistant, allowing you to control your smart home devices directly from your Stream Deck.
Features
- Connect to Home Assistant via WebSocket API
- Control switches and lights
- Support for RGB lights with color selection
- Nested menu navigation
- Persistent connection with automatic reconnection
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Usage
Basic Example
use ;
use ;
use ;
async
Configuration
Create a config.yaml file with your Home Assistant configuration:
url: "ws://homeassistant.local:8123/api/websocket"
menu:
name: "Home"
buttons:
- type: "switch"
entity_id: "switch.living_room_light"
name: "Living Room Light"
- type: "rgb_light"
entity_id: "light.bedroom_rgb"
name: "Bedroom RGB"
- type: "menu"
name: "Kitchen"
buttons:
- type: "switch"
entity_id: "switch.kitchen_light"
name: "Kitchen Light"
Set your Home Assistant API token as an environment variable:
Beta Version
This library is currently in beta. While it is functional, there may be bugs or incomplete features. Please report any issues you encounter. Colorful buttons for RGB lights are not yet implemented, due to base library limitations, that will be fixed in the future.
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.