Govee integration

Thank you @LaggAt . I was banging my head against a wall trying to revert some changes I had done. I’m running 4 strips because of the great work you have done for all us.

1 Like

No worries, most of us run dockerized. You need to use the HACS page, there will be an update shown. If you don’t use HACS you should consider installing it, it really makes your life easier.

Thank you @phairplay, @Scope666, @HDDriller. Appreciate your words.

1 Like

Same problem, from Yesterday my Govee integration not function anymore. It show “not avalbale” the led strip. I have try to requesta a new API key and reinstall the integration from HA. I have HACS but nothing show me to update. Can you help me?

1 Like

I you configured the custom repository correctly, HACS will walk over the git repos and will find a new update sooner or later. Correct HACS setup is show in first post, but if you see the govee in the HACS/Integrations tab, you should be fine:

Just read over the HACS user documentation, it mentions a reload button on the component.

I don’t see that button, but I think opening this component page already triggers the update.

Ah yes, and if you are on 0.1.8 already, you’re fine :slight_smile:

Upcoming version will have a feature to disable updates to device state. Development is ongoing, but let’s show how it will look like:

In the integration’s ‘options’, there will be a new option:

image

Usually this text field is empty, and that’s how it should be most of the time.
Once something breaks (in API or in my code) which messes with state, we could add something here to ignore some updates. The above example text is disabling power_state updates from API (so the API can’t tell us if the device is on or off), and we disable color changes from locally generated states.

Syntax is:

<api|history>:<attribute>;[...]
             : a colon separates source and attribute
                         ; a semicolon separates multiple pairs

This feature isn’t inteded for daily use, it’s for times when there are issues with the state we get. Use wisely. I’ll probably publish the version soon, if the problem with power_state persists. Development is almost done.

So again, please update your integration versios, to not run into the breaking changes. Thanks.
If you read this too late, just update asap afterwards.

Thank you for your support! I have sucessfuly update the version of the integration to 0.18 But nothing change. I have try to rermove and reinstall the integration, when insert my API Key it detect correctly the led stripe and add to my HA. But the state is “unavailable”image
image

yes, 0.18 is a preparation for an upcoming update.

Govee currently has an issue with on/off state, but not with devices showing unavailable. Was it working before with this integration? Is the wifi configuration of the led correct? does the wifi allow Internet access? If all fails, please provide debug logs as described in first post. Thanks.

Thankyou for the patience, the led strip work correctly, I have installed it two month ago and no problem unitil yesterday. With the govee app I can use the LED strip without problem, I can add the inegration but on the Homeassistan is still unavailable the on/off state. How can I put the log here? I have found only the general log but nothing about the strip. Thank you very much!

1 Like

Hi, you need to enable debug logging for this Govee integration, please read the first post, it is described there. Without that I probably can’t help.

Once you have that, please use the “Preformatted Text” button (or triple-backticks) to format your log.
image

Once to clarify: do you have an issue with an ‘unavailable’ state, or do you have an issue with the power_state (on/off )?

For ON/OFF all have this issue right now, until Govee fixes the API.

I can’t use on/off button, is greyed out and in the entities menu i Have this:
image

I think is a problem of unavailable entity, but in fact i can’t take on/off

1 Like

seems so, let’s go for the logs.

2021-04-17 16:34:50 DEBUG (MainThread) [custom_components.govee.light] _async_update
2021-04-17 16:34:50 DEBUG (MainThread) [govee_api_laggat.govee_api_laggat] get_states
2021-04-17 16:34:50 DEBUG (MainThread) [govee_api_laggat.govee_api_laggat] Rate limit total: 100, remaining: 99 in 59.81529879570007 seconds
2021-04-17 16:34:50 DEBUG (MainThread) [govee_api_laggat.govee_api_laggat] state returned from API: {'data': {'device': 'XXXXXXX, 'model': 'H6159', 'properties': [{'online': 'false'}, {'powerState': 'off'}, {'brightness': 1}, {'color': {'r': 0, 'b': 255, 'g': 0}}]}, 'message': 'Success', 'code': 200}, resulting state object: GoveeDevice(device='XXXXXX', model='H6159', device_name='Sottoletto', controllable=True, retrievable=True, support_cmds=['turn', 'brightness', 'color', 'colorTem'], support_turn=True, support_brightness=True, support_color=True, support_color_tem=True, online=False, power_state=False, brightness=2, color=(0, 0, 255), color_temp=0, timestamp=1618670090.254171, source='api', error=None, lock_set_until=0, lock_get_until=0, learned_set_brightness_max=100, learned_get_brightness_max=100, before_set_brightness_turn_on=False, config_offline_is_off=False)
2021-04-17 16:34:50 DEBUG (MainThread) [custom_components.govee.light] Finished fetching govee data in 0.253 seconds
2021-04-17 16:35:00 DEBUG (MainThread) [custom_components.govee.light] _async_update
2021-04-17 16:35:00 DEBUG (MainThread) [govee_api_laggat.govee_api_laggat] get_states
2021-04-17 16:35:00 DEBUG (MainThread) [govee_api_laggat.govee_api_laggat] Rate limit total: 100, remaining: 95 in 9.967535972595215 seconds
2021-04-17 16:35:00 DEBUG (MainThread) [govee_api_laggat.govee_api_laggat] state returned from API: {'data': {'device': 'XXXXXXXXXXX', 'model': 'H6159', 'properties': [{'online': 'false'}, {'powerState': 'off'}, {'brightness': 1}, {'color': {'r': 0, 'b': 255, 'g': 0}}]}, 'message': 'Success', 'code': 200}, resulting state object: GoveeDevice(device='XXXXXXX', model='H6159', device_name='Sottoletto', controllable=True, retrievable=True, support_cmds=['turn', 'brightness', 'color', 'colorTem'], support_turn=True, support_brightness=True, support_color=True, support_color_tem=True, online=False, power_state=False, brightness=2, color=(0, 0, 255), color_temp=0, timestamp=1618670100.234228, source='api', error=None, lock_set_until=0, lock_get_until=0, learned_set_brightness_max=100, learned_get_brightness_max=100, before_set_brightness_turn_on=False, config_offline_is_off=False)
2021-04-17 16:35:00 DEBUG (MainThread) [custom_components.govee.light] Finished fetching govee data in 0.230 seconds

You can understand something?

1 Like

Hm … API knows about your device, but tells us the device is offline.
So this is not the integration. Could you try re-pairing and/or re-connecting wifi in the Govee Home App?

Great, now work perfectly!! Thank you very much for your support!!

1 Like

That was fast, glad it worked.

1 Like

Hi,
My lights have started turning off and on again, is this related to this integration

1 Like

It’s a bit of guesswork with that information. Is the light turning, is it the switch in home assistant, …
Could you provide more details what you try to do and what happens?

Sorry your right.
My lights are powered by my TV via USB. Randomly the lights would turn off and turn back on again.

It only started doing it yesterday

Nothing shows any different in HA it did catch it turn on and off

I forgot about HACS !! updated govee integration and now it works again, thanks! Awesome work, really appreciated

1 Like