core: Growatt: Login fail

The problem

I’m trying to log into my Growatt API. This error comes…

What version of Home Assistant Core has the issue?

core-2024.7.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Growatt

Link to integration documentation on our website

https://www.home-assistant.io/integrations/growatt_server/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Error while setting up growatt_server platform for sensor

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/usr/src/homeassistant/homeassistant/components/growatt_server/sensor.py", line 88, in async_setup_entry
    devices, plant_id = await hass.async_add_executor_job(get_device_list, api, config)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/growatt_server/sensor.py", line 51, in get_device_list
    user_id = login_response["user"]["id"]
              ~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'user'

Additional information

No response

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 1
  • Comments: 24

Most upvoted comments

IMG-20240711-WA0000.jpg

Yes Here i found an answer

Make an automation. Add all the entities you want to update periodically.

I have this one:

alias: Update Growatt description: “” triggers:

  • trigger: time_pattern minutes: /10 conditions:
  • condition: sun after: sunrise
  • condition: sun before: sunset before_offset: “+00:30:00” actions:
  • action: homeassistant.update_entity data: entity_id: - sensor… - sensor… - sensor…

Open the Growatt integration. Click on the 3 dots at the right. Then disable in this dialogue:

On Sun, Jan 26, 2025 at 8:15 PM paargyorgy @.***> wrote:

I found a way to reduce the number of queries being sent.

You can disable polling at the level of the integration. Then create an automation to poll only e.g. every 15 mins and only between sunrise and sunset. I can’t tell yet if this prevents the temporary lock of my account, but it’s worth a try. I should know within a couple of days.

“You can disable polling at the level of the integration.” where and how? I can’t find it.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/121703#issuecomment-2614554128, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJS27UXWGJWLOLB37GLSXQ32MUX47AVCNFSM6AAAAABKVQHKGWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJUGU2TIMJSHA . You are receiving this because you were mentioned.Message ID: @.***>