Very much vibecoded - take that as you will.
Displays real-time Home Assistant sensor data on the NanoKVM Pro's (Desk Variant) RGB565 display with power monitoring graphs and temperature readings.
- Power Monitoring: Cycles through multiple power sensors with live graphing
- Temperature Display: Shows temperature with color-coded indicators (blue→red gradient)
- Auto-Cycling: Rotates between configured sensors at set intervals
- Color Gradients: Visual indicators for power usage (grey→green→yellow→red)
pip install -r requirements.txtDependencies: numpy, Pillow, requests, PyYAML
-
Copy
config.example.yamltoconfig.yaml -
Edit
config.yamlwith your Home Assistant details:ha_url: Your Home Assistant URLha_token: Long-lived access tokenfont_path: Path to TTF font filepower_sensor_ids: List of power sensor entity IDstemp_sensor_id: Temperature sensor entity ID
-
Configure thresholds and intervals as needed
| Option | Description | Default |
|---|---|---|
power_update_interval |
Power refresh rate (seconds) | 10 |
temp_update_interval |
Temperature refresh rate (seconds) | 60 |
sensor_switch_interval |
Time between sensor rotation (seconds) | 30 |
power_graph_min/max |
Graph Y-axis range | 0/1000 |
power_green/red_threshold |
Color gradient thresholds | 100/500 |
temp_cold/hot_threshold |
Temperature color thresholds | 60/80 |
python3 hass/hass.pyRun as a service for continuous display.
- Top Right: Temperature with color gradient
- Left Side: Power history graph (6 data points)
- Bottom Right: Current time (12-hour format)
- Graph Labels: Sensor name, min/max values, current readings
- "Error: config.yaml not found": Copy and configure
config.example.yaml - Connection errors: Verify Home Assistant URL and token
- Font errors: Check
font_pathor script uses fallback fonts - Display issues: Ensure
/dev/fb0access permissions
Generate a long-lived access token:
- Go to Home Assistant → Profile
- Scroll to "Long-Lived Access Tokens"
- Click "Create Token"
- Copy token to
config.yaml