This guide provides step-by-step instructions for integrating the Govee Smart Heater H7131 into Home Assistant using the Govee Developer API.
- Turn heater on/off through Home Assistant
- Monitor heater state
- Automatic state updates every 30 seconds
- Support for multiple heaters (optional)
- Uses modern template integration syntax
Before you begin, make sure you have the following:
- Govee Smart Heater H7131
- Govee Home app (iOS, Android) with already added device
- Home Assistant installed and running
Use the Apply Govee-API-Key instructions to get your API key.
Make a request to the Govee Developer API to get the list of devices, replacing YOUR_GOVEE_API_KEY with the API key obtained in the previous step.
curl --location 'https://openapi.api.govee.com/router/api/v1/user/devices' \
--header 'Content-Type: application/json'
--header 'Govee-API-Key: YOUR_GOVEE_API_KEY'
wget --no-check-certificate --quiet \
--method GET \
--timeout=0 \
--header 'Govee-API-Key: YOUR_GOVEE_API_KEY' \
--header 'Content-Type: application/json' \
'https://openapi.api.govee.com/router/api/v1/user/devices'
Add lines from configuration.yaml, scripts.yaml, automations.yaml and secrets.yaml to your configuration files. You should replace YOUR_GOVEE_API_KEY and YOUR_GOVEE_DEVICE_1_ID in these files beforehand. If you need to add a second device, uncomment the appropriate lines in scripts.yaml, configuration.yaml and automations.yaml.
Restart Home Assistant to apply the changes made to the configuration.
If you set this integration up before December 2025, your configuration.yaml probably used the legacy switch: block with platform: template. Home Assistant deprecated that syntax and it stops working in version 2026.6, so you will see a "Legacy switch template deprecation" item under Settings > Repairs.
To migrate, replace the old switch: / platform: template / switches: block with the modern template: / - switch: block from configuration.yaml in this repo. The key changes are value_template to state, friendly_name to name, icon_template to icon, and service: to action: inside turn_on and turn_off.
The example here uses unique_id, which is right for a fresh setup. If you are migrating an existing setup and want to keep your current entity IDs (so dashboards and automations keep working), add default_entity_id: switch.your_existing_id to each switch instead, then restart Home Assistant to apply the changes.
Feel free to submit issues and pull requests to improve this integration.
Happy automating! 🏡✨
