Govee integration

Probably just wait a bit until the libraries are installed. If this isn’t working check the first post for installation instructions.

Here’s some more info: went to check status in Govee app which did correctly indicate light status. Got a message in the app to update firmware in lights. Did the firmware update and now lights not available in HA despite a restart. So I suspect API specs changed somehow.

1 Like

Well, i get no firmware update, seems unrelated to me anyway.

It’s very clear that the API returns wrong values (but the API itself is OK):
My light returns

"powerState": "off"

no matter if it’s on or off.
Seems we are stuck in a state, and do not get updates.

Therefore I wrote Govee.

1 Like

Hi,

as I want to introduce some changes in the library, please update to the latest version.

Possible answers to your questions:

No, this will not fix the issue in the Govee API, I requested a fix per mail.
Yes, this has to do with that current issue.
Huh? Read on.

The version numbers in the underlying library is not pinned currently, which means this integration will always use the most recent library govee-api-laggat. I plan to introduce some breaking changes i the next few days, so this would break your integration. Therefore I wait a bit, and give you a version pinning that current 0.1.39 version and you will be fine.

Don’t worry if you miss that update, I’ll try to provide a new version using the newer library minutes after the new library. So if your version breaks, go for a coffee and try an update afterwards.

How can we handle API errors in the future?

in v0.1.9 of that integration (hopefully) will be an option to disable single attributes for updates from API, so for example: if we had that feature right now we could just configure our system to ignore power_state updates from API. The integration is good at guessing the right state before it is returned from API, and this would still happen. This would be enough for most of us. This will just work by going to integrations - Govee - “Options” and type a string like “API:power_state”. Cool?

Well, at least we have that feature next time. It just needs someone to post a string here when something breaks next time and we are all good :slight_smile:

4 Likes

@LaggAt
Your speedy response and continued support is much appreciated.
Sir I salute you!

2 Likes

100% agree, Florian is the BEST, so much so I even bought a 2nd Govee strip because of how awesome his integration is.

1 Like

having trouble also, this integration has been working fine for a long time and since yesterday, it’s not working anymore, shows unavailable in HA, but works fine in the govee app.

How exactly can I update my Govee integration in home assistant? Is it even possible since I installed HA with docker?

Thanks

1 Like

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