Control your Govee smart lights through Home Assistant with real-time updates, color control, and smart API usage management.
- β¨ Complete light control (on/off, brightness, color, temperature)
- π Real-time state updates
- π¨ Full RGB and color temperature support (2000K-9000K)
- π Built-in API usage monitoring
- π Smart power management
- π¦ Automatic rate limiting protection
- π± Custom dashboard cards included
-
Get your Govee API Key:
- Go to Govee Developer Portal
- Create an account or sign in
- Click "Create API Key"
- Copy your API key
-
Install in Home Assistant:
# Option 1: HACS 1. Add this repository to HACS 2. Install "Govee Lights" integration 3. Restart Home Assistant # Option 2: Manual 1. Download this repository 2. Copy custom_components/govee to your config/custom_components/ 3. Restart Home Assistant
-
Configure:
- Go to Settings β Integrations
- Click "+ Add Integration"
- Search for "Govee"
- Enter your API key
- Govee limits API calls to 10,000 requests per day
- This integration includes smart rate limiting to prevent reaching this limit
- Each device update counts as one API call
- Default polling interval is 1 minute per device
- Auto-updates occur when state changes (minimum 2-second delay)
- Works with most Govee smart lights that support the Govee API
- Devices must be:
- Connected to WiFi
- Set up in the Govee app
- Compatible with Govee's API (check your model in the Govee app)
- Color temperature range: 2000K-9000K
- Minimum update interval: 2 seconds
- Some older models may not support all features
- API key is tied to your Govee account
- API rate limit is shared across all devices
- Entity ID:
sensor.govee_api_calls - Shows total daily API calls
- Tracks remaining calls
- Monitors rate limit status
Add to your dashboard:
type: custom:govee-api-monitor-card
entity: sensor.govee_api_calls- π’ NORMAL: Below 80% usage
- π‘ WARNING: 80-90% usage
- π΄ CRITICAL: Above 90% usage
The integration automatically manages polling intervals based on:
- Number of devices
- Current API usage
- Rate limit status
Default intervals:
- Minimum: 2 seconds between updates
- Regular polling: 1 minute
- Adaptive increase when approaching limits
If you have many devices (10+):
- Monitor
sensor.govee_api_callsinitially - Check actual usage patterns
- Consider creating automations to adjust polling based on occupancy
-
Verify in Govee app:
- Device is online
- Device is connected to WiFi
- Device supports API control
-
Check Home Assistant logs:
2025-08-21 12:00:00 ERROR (MainThread) [custom_components.govee]
-
Validate API key:
- Test in Govee Developer Portal
- Ensure key has permissions
- Monitor usage with dashboard card
- Check logs for rate limit warnings
- Consider reducing polling interval
- Look for automations causing excessive updates
- Ensure stable internet connection
- Check device WiFi connection
- Verify Govee cloud service status
- Restart Home Assistant
The integration updates device states in three ways:
- Regular polling (every minute)
- On command (when you control the device)
- Auto-updates (when state changes, min 2-second delay)
- π‘ Turn On/Off
- π Brightness (0-100%)
- π¨ RGB Color
- π‘οΈ Color Temperature (2000K-9000K)
# Turn on light
service: light.turn_on
target:
entity_id: light.govee_bedroom
data:
brightness_pct: 100
# Set color
service: light.turn_on
target:
entity_id: light.govee_bedroom
data:
rgb_color: [255, 0, 0] # Red
# Set color temperature
service: light.turn_on
target:
entity_id: light.govee_bedroom
data:
color_temp_kelvin: 3000 # Warm white# Simple light card
type: light
entity: light.govee_bedroom
# With API monitoring
type: vertical-stack
cards:
- type: light
entity: light.govee_bedroom
- type: custom:govee-api-monitor-card
entity: sensor.govee_api_calls-
"Rate limit reached":
- Normal protection mechanism
- Wait for limit reset (midnight UTC)
- Monitor usage with dashboard card
-
"Device not responding":
- Check device WiFi connection
- Verify device power
- Reset device if persistent
-
"API key invalid":
- Verify key in Govee Developer Portal
- Check for spaces/typos
- Generate new key if needed
- Keep your API key secure
- Don't share your key publicly
- One key works for all devices
- Keys can be revoked in Govee portal
- Fork repository
- Create feature branch
- Commit changes
- Open pull request
MIT License - See LICENSE file
- Open an issue on GitHub
- Join Discord community
- Check troubleshooting guide above
Show your support by starring the repository!
custom_components/govee_light_automation/
βββ __init__.py # Main integration file
βββ manifest.json # Integration metadata
βββ const.py # Constants and configuration
βββ config_flow.py # Configuration flow
βββ govee_api.py # Govee API client
βββ light.py # Light platform implementation
βββ translations/ # UI translations
βββ en.json
To test the integration:
- Install the integration in a development Home Assistant instance
- Use the Govee API testing tools to verify API responses
- Check Home Assistant logs for any errors
- Fork this repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Shiv Kumar Ganesh - gshiv.sk@gmail.com
This project is licensed under the MIT License.
For support:
- Check the troubleshooting section above
- Review Home Assistant logs
- Open an issue on GitHub with detailed information about your problem
- Initial release
- Basic light control functionality
- RGB color support
- Brightness control
- Device discovery