A small Rust application for controlling a smart light through a Home Assistant instance from a Windows taskbar notification-area (system tray) icon
Taskbulb is designed to control a room's light without popups or web technologies, keeping the experience unintrusive
- A running Home Assistant instance with a light entity
- The Rust toolchain, including Cargo
- Windows for the full feature set, including the taskbar controls and global mouse-wheel shortcuts. (basic toggling is the only fully cross platform feature)
-
Clone the repository:
git clone https://github.com/BenMcAvoy/Taskbulb.git cd Taskbulb -
Build the release executable:
cargo build --release -j 4The executable will be created at
./target/release/taskbulb.exeon Windows. The file extension is platform-dependent
-
Copy
.env.exampleto.env -
Fill in the following values:
Variable Description HA_BASE_URLThe base URL of your Home Assistant instance, without a trailing slash (for example, http://homeassistant.local:8123)HA_TOKENA long-lived access token created from your Home Assistant user profile's Security tab in the website HA_ENTITY_IDThe light's entity ID, e.g. light.bedroom, from Home Assistant's entities list on the website -
Run the executable:
.\target\release\taskbulb.exe
| Shortcut | Action |
|---|---|
| Scroll | Adjust value |
| Shift+Scroll | Adjust brightness on all DDC/CI monitors |
| Ctrl+Scroll | Adjust hue (0-255) |
| Alt+Scroll | Adjust saturation |
| Middle-click | Reset hue and saturation to 0 |
To start Taskbulb automatically when the current Windows user signs in:
- Create an install directory, for example
%LOCALAPPDATA%\Taskbulb. - Copy
target\release\taskbulb.exeand.envinto that directory. The.envfile must be beside the executable. - Open the per-user Startup folder by pressing
Win+R, enteringshell:startup, and pressing Enter. - Create a shortcut named
Taskbulbin that folder. Set its target to the installedtaskbulb.exeand its Start in / working directory to the install directory.
Only the shortcut should be placed in the Startup folder; keep the executable and .env together in the install directory.
