Govee Appliances (Heaters, Fans, Purifiers)

Is this thread still active? I’m trying to add my H7130 heater and my API key does not seem to be working. I receive {“message”:“Miss API Key”,“status”:401} when trying to send a Rest command (tried in both command prompt and Postman). Does it take some time for the API keys to authenticate?

Thank you. This helped me a lot.
2 things that might help someone else.
To be able to access the device/entity via GUI you need to add Unique ID.
Example
fan:

  • platform: template

    fans:
    office_air_purifier:
    friendly_name: “Office Air Purifier”
    unique_id: GoveeOfficeAirPurifier2023 (or whatever you like)

For someone using Winows powershell. The script is:
curl --request GET ‘https://developer-api.govee.com/v1/appliance/devices/’ -H ‘Content-Type: application/json’ -H ‘Govee-API-Key: YourAPIKey’

If anyone is having issues with the curl code, try using double-quotes rather than single quotes. I could not get it to work before doing this.

Will try this tomorrow! I just got the Govee smart tower fan H7102 and tried to set it up using Google Assistant SDK integration, but it didn’t have any way to get the status of the fan and I couldn’t figure out how to get it on my dashboard. Thanks for all the config yamls guys. I really hope someone can make an integration for this so its easier for normal users to setup in the future.

Me too I have enough knowledge to understand what the codes doing but not how to build it.

I built the original REST command and I’d love to build an actual integration… The only hold up is the appliance API doesn’t offer any sort of status as of yet. I don’t know if there is a plan to implement it, I keep asking in the Govee community forums but I’m not getting a response.

1 Like

In all honesty I’d build it still even with this issue, just let it be noted and we can try and get Govee to do something about a status api. Govee doesn’t seem to have the greatest API when it comes to their actual appliances but I think even with this small issue it’s still worth putting together until they do or someone finds a work around.

2 Likes

tried to set it up using Google Assistant SDK integration, but it didn’t have any way to get the status of the fan and I couldn’t figure out how to get it on my dashboard

You should be able to achieve that with: GitHub - tronikos/google_assistant_sdk_custom: Fork of Google Assistant SDK integration to allow getting responses from commands to Google Assistant

Currently also stuck on the “gear” calls. Modes and turn work well. Gear does not seem to work as advertised in isolated calls. I don’t see support either for oscillate, which is a bummer.

I got it up and working for On & Off.
But I need help please to switch from the different speeds:

rest_command:
  rest_govee_appliance:
    url: https://developer-api.govee.com/v1/appliance/devices/control
    method: PUT
    headers:
        Content-Type: application/json
        Govee-API-Key: 123
    content_type:  'application/json; charset=utf-8'
    payload: '{"device": "{{ device }}","model": "{{ model }}","cmd": {"name": "{{ cmd_name }}","value": "{{ cmd_value }}"}}'

fan:
  platform: template
  fans:
    govee_smart_heater:
      friendly_name: "Govee Smart Heater"
      value_template: "{{ states('input_boolean.govee_smart_heater_status') }}"
      preset_mode_template: "{{ states('input_select.govee_smart_heater_modus') }}"
      turn_on:
        service: script.govee_smart_heater_an
      turn_off:
        service: script.govee_smart_heater_aus
      set_preset_mode:
        service: script.govee_smart_heater_modus
        data:
          govee_smart_heater_modus: >
            {% set mapper = {'Low': 1, 'Medium': 2, 'High': 3} %}
            {{ mapper[preset_mode] }}
      speed_count: 3
      preset_modes:
        - 'Low'
        - 'Medium'
        - 'High'

Here the boolean:

Bildschirmfoto-2023-11-10-um-01-49-01

Here the Select:

Bildschirmfoto-2023-11-10-um-01-52-15

and here the scripts:

On

alias: Govee Smart Heater An
sequence:
  - service: rest_command.rest_govee_appliance
    data:
      device: 18:C6:00:00:00:00:00:00
      model: H713A
      cmd_name: turn
      cmd_value: "on"
    enabled: true
  - delay:
      hours: 0
      minutes: 0
      seconds: 0
      milliseconds: 300
  - service: input_boolean.turn_on
    target:
      entity_id: input_boolean.govee_smart_heater_status
    data: {}
mode: single

Off

alias: Govee Smart Heater Aus
sequence:
  - service: rest_command.rest_govee_appliance
    data:
      device: 18:C6:00:00:00:00:00:00
      model: H713A
      cmd_name: turn
      cmd_value: "off"
    enabled: true
  - delay:
      hours: 0
      minutes: 0
      seconds: 0
      milliseconds: 500
  - service: input_boolean.turn_off
    target:
      entity_id: input_boolean.govee_smart_heater_status
    data: {}
  - service: input_select.select_option
    entity_id: input_select.govee_smart_heater_modus
    data:
      option: "Off"
mode: single

Mode

alias: Govee Smart Heater Modus
sequence:
  - service: input_select.select_option
    entity_id: input_select.govee_smart_heater_modus
    data:
      option: >-
        {% set mapper = {1: "Low", 2: "Medium", 3: "High"} %}
        {{mapper[govee_smart_heater_modus] }}
    enabled: true
  - delay:
      hours: 0
      minutes: 0
      seconds: 0
      milliseconds: 500
  - service: rest_command.rest_govee_appliance
    data:
      device: 18:C6:00:00:00:00:00:00
      model: H713A
      cmd_name: mode
      cmd_value: "{{ govee_smart_heater_modus }}"
  - service: input_boolean.turn_on
    target:
      entity_id: input_boolean.govee_smart_heater_status
    data: {}
mode: single
icon: mdi:radiator

What am I doing wrong?

1 Like

For your Modes you need to make sure that 1, 2, and 3 are what the data is showing from Govee when you pull your appliances info.

So like on my humidifier to run in AUTO I need to send the command “3” to tell Govee to set it to AUTO. I would first check what your Govee data pulled for this.

So say to run on LOW your options “MODE” may say like 3 so you would put 3 in your Mode script you created instead of 1.

1 Like

Hello Kyle,
you are right and I checked that too.

See this reply from the API:


{"data":{"devices":[{"device":"18:C6:00:00:00:00:00:00","model":"H713A","deviceName":"Smart Heater","controllable":true,"retrievable":false,"properties":{"mode":{"options":[{"name":"Low","value":"1"},{"name":"Medium","value":"2"},{"name":"High","value":"3"},{"name":"Fan","value":"4"},{"name":"Auto","value":"5"}]}},"supportCmds":["turn","mode"]}]},"message":"Success","code":200}**%**

There we can see that Low is 1, Medium is 2 and High is 3.

But I can’t switch between low, medium and high.

At the moment I can only turn it on and turn it off.

Any feedback?

I’m actually thinking about writing a custom component for this, now that I got the Abode cameras working with HA.

There has to be some sort of status API – the Govee app knows the status of my H7100 immediately. Might be worth throwing a proxy on the LAN to capture the traffic from the app. Have you tried that yet?

EDIT: I tried setting up HomeBridge and the Govee plugin, and sure enough, it was able to control the fan. Maybe if I take apart that plugin’s code, I can code something equivalent in Python for HA.

3 Likes

I have not tried this, but I would ABSOLUTELY help out in a custom component if we found a way to get status. If there is no way, I’m not sure a custom component is necessary.

Are you controlling it with the fan you had created in your configuration.yaml file?

By changing it with the input select, this will not do anything, the actual fan config you made is what will call onto the scripts and inputs to work right.

Some what I have done myself is used the tile card, selected my created fans, then when I click on the fans to bring up the more info box, the created modes I have set in my configuration are displayed and can be used.

If you are still having issues let me know and if you want to I can help you directly and see if we can figure it out together.

Also ignore the percentage I’ve not been able to get that working yet and I’ve been too busy to figure it out.

I was able to get the fan to work fully in HA (including speeds and oscillation) by running Homebridge and homebridge-govee, and then using the HomeKit Device integration in HA. Kind of a pain but it works, and it means I don’t have to try to reverse-engineer the homebridge-govee code right this minute.

Hey Kyle,
Glad you are trying to help me find the issue.
I have posted above all the code I have regarding this topic.

If you think you can find the issue, feel free to dive into the code.

To this day I was not able to find the problem.

And I also don’t get any error message to work with along the way.

Dear all,
Thanks to the great input from the community I did a video regarding this topic.

However I hope it can help the community to understand the whole topic and get it run.

  1. Disclaimer: German language
  2. Disclaimer: Modes are not working yet but the logic is implemented. I think I need to check the references and fix it but I have literally no time due to other video projects :frowning:
1 Like

Hello everyone,

Has anyone figured out a way to control the H7172 Ice Maker via HA (GoveeLife Portable Countertop Ice Maker)? I recently purchased this simply for the schedule making, and I would like to integrate this with HA.

1 Like

I have a H713B and have added this to my config.yaml

rest_command: 
  rest_govee_appliance:
    url: https://developer-api.govee.com/v1/appliance/devices/control
    method: PUT
    headers:
        Content-Type: application/json
        Govee-API-Key: (The Key)
    content_type:  'application/json; charset=utf-8'
    payload: '{"device": "{{ device }}","model": "{{ model }}","cmd": {"name": "{{ cmd_name }}","value": "{{ cmd_value }}"}}'
    verify_ssl: true

When I go to services and use this…

service: rest_command.rest_govee_appliance
data:
  device: 60:74:F4:1A:EE:86
  model: H713B
  cmd_name: turn
  cmd_value: "On"

I get a nice green tick but the device does not turn on??

Any ideas?