# Clone or download project
cd screen-light-sync
# Run setup script
./setup.sh# Copy example environment file
cp .env.example .env
# Edit configuration with your favorite editor
nano .env
# or
code .envEdit these variables in .env:
HA_URL: Your Home Assistant URLHA_TOKEN: Long-lived access token from HALIGHT_ENTITY: Your smart light entity ID
# Activate virtual environment
source venv/bin/activate
# Test connection
python main.py --test./run.sh# Basic mode
python main.py
# Fast mode
python main.py --fast
# Dominant color mode
python main.py --mode dominant
# Custom interval
python main.py --interval 1.0- High performance: Use
--fastmode - Accurate colors: Use
--mode dominant - Low CPU: Increase
--intervalto 1.0 or higher - Multiple monitors: Use
--monitor 2(for second monitor)
| Issue | Solution |
|---|---|
| Import error | pip install -r requirements.txt |
| Connection failed | Check URL & token in .env file |
| Entity not found | Verify entity ID in Home Assistant |
| Performance slow | Use --fast mode |
- Settings → People → Users → [Your user] → Security
- Create "Long-Lived Access Token"
- Copy token to
HA_TOKENin .env file - Find entity ID in Developer Tools → States