This is a long shot. but i have a request/question. Is it possible to make an automation that will reload a service?
heres why im asking. Govee has a cap on the amount of API calls a user can do in a day. i find my self going above that limit quite often. this ends up making all the devices go “unavailable”. to fix this, under devices and services if i go to the govee service and click on the three dots and press reload. it will reconnect the devices. im wondering if i can do an automation that says if the devices go to unabailable for a certain amount of time itll trigger taht service to reload. Again, i realize this is a huge long shot but if anyone would know its the community.
Yes you can do this. See: https://www.home-assistant.io/integrations/homeassistant/#service-homeassistantreload_config_entry
trigger:
- platform: state
entity_id: some.entity
to: 'unavailable'
for:
minutes: 10
action:
- service: homeassistant.reload_config_entry
data:
entity_id: some.entity
You’re using this right? The govee integration in HACS?
The reason your reload the integration trick is working is because the library that integration uses seems to have some built-in internal controls to protect users from hitting govee’s rate limits. By reloading the integration you’re resetting it’s cache and counters.
While you’re welcome to do this I would definitely advise against it. The govee API itself has a rate limits for your account and if you hit that then it doesn’t matter how many times you reload the integration, it’s going to cut you off for the rest of the day completely. They may even cut you off indefinitely if you keep doing it. Cloud services generally do not like when clients keep hitting them too frequently, they consider you an attacker and protect themselves by cutting you off.
If your strategy is working it suggests that perhaps the library is being a bit too aggressive in it’s protection strategy. Clearly you are able to get in more calls a day then it thinks you can. I’d suggest submitting an issue on the repo, describing what you’re doing and asking for a better way.
I’m seeing the same issue. In the past three weeks or so, I’ve notice that Nest, Radio Browser & Yolink integrations would be unavailable and I would have to manually click the three dots & reload. I’m wondering why is it so hot in my house, only to find out the Nest thermostat was unavailable! Thoughts?
Yes, definitely happening to me as well. Similar is resulting - my furnace status going nuts, then eventually off line until reboot. I’m just going to replace all of my Govee reliance widgets (‘Aladdin Connect’ doing the same thing… needing reauthentication almost daily!).
Kinda defeats the purpose of Home Automation. C’mon Matter!