Govee integration

Probably you all know, there is an issue in Govee API returning the wrong power state.

It looks like this (well, if you use the two-button History-state):
govee-issue
… and it should work like this because the light stay’s on:
govee-working

Now, Version 0.1.9 is released in some minutes!

With that version you could work around such issues yourself. It is a bit technical, so I will try to explain the steps needed for the current issue before explaining the feature.

To fix the current issue:

  1. go to Configuration - Integration, click on ‘Options’
  2. in ‘DISABLE state updates’ enter: ‘api:power_state’. No quotes, with a colon.
  3. remember to remove that again once Govee fixed the issue. Do this by typing a space in that same text box. Just deleting it doesn’t work, someone report this to Home Assistant please :slight_smile:

n3w38wQlIa

So, what does it do?

OK, let’s get a bit technical.

We have two sources for state.

  1. the integration (well, the library behind it) is guessing the next state when sending any request, e.g. when you set the Brightness to 50, we assume the light will be on, and the brightness will be 50. Let’s call this assumptions ‘HISTORY’ states.
  2. we request a state from Govee API, and get a result. This source I call ‘API’.

Above you started typing with ‘api:…’ - this is the source of the state we want to ignore.

Next, we entered ‘…power_state’. You may guess it, this is the attribute we want to ignore. Anything but power_state is still set.

There are some attributes, you can always find them in the source (no worries, this is an easy file):
python-govee-api: govee_dtos.py

You probably want to mess with these attributes, and not any attribute other than these works.

And there is more. As this is something you want to remember turning off again, there will be a lot of warning logs for every state attribute ignored:

You should really reset this by entering a space (’ ') in that ‘DISABLE state updates’ field in options, as soon as the issue is fixed.

What if you want to disable multiple state updates someday?

Just separate them by semicolon ; Example?

api:online;api:power_state;history:power_state;history:color

Use this feature with care, and remember to disable it before reporting bugs. You’re disabling state updates, this may look like a bug if you do it wrong :smiley:

Last but not least: documentation: hacs-govee/README.md at master · LaggAt/hacs-govee · GitHub

So, thanks for all your nice words in the last few hours and your donations, now I’ll do the release, watch a F1 race and would need some more coffee today. :rofl:

Buy Me A Coffee

5 Likes