home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.69k stars 28.85k forks source link

AirGradient error setting Configuration Source to Cloud #118916

Open MallocArray opened 3 weeks ago

MallocArray commented 3 weeks ago

The problem

After adding an AirGradient ONE running 3.1.1 using this integration, everything was working fine. I saw the option for "Configuration source" was set to Local, and since I currently want to still use the Cloud control, I changed to that and an error appeared in the lower left corner:

image

No further errors appear, but unsure if this actually happened.

What version of Home Assistant Core has the issue?

2024.6.0

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

airgradient

Link to integration documentation on our website

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

Diagnostics information

AirGradient ONE Firmware 3.1.1

The only extra change I made was I enabled the Signal Strength sensor that was disabled by default, and performed that before I attempted to change to Cloud Control

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:241 integration: Home Assistant WebSocket API (documentation, issues) First occurred: 4:23:17 PM (2 occurrences) Last logged: 4:28:52 PM

[546907896944] Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 977, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1049, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/select/init.py", line 191, in async_handle_select_option await self.async_select_option(option) File "/usr/src/homeassistant/homeassistant/components/airgradient/select.py", line 107, in async_select_option await self.entity_description.set_value_fn(self.coordinator.client, option) File "/usr/local/lib/python3.12/site-packages/airgradient/airgradient.py", line 104, in set_configuration_control await self._set_config("configurationControl", configuration_control) File "/usr/local/lib/python3.12/site-packages/airgradient/airgradient.py", line 90, in _set_config await self._request("config", method=METH_PUT, data={field: value}) File "/usr/local/lib/python3.12/site-packages/airgradient/airgradient.py", line 71, in _request raise AirGradientConnectionError( airgradient.exceptions.AirGradientConnectionError: ('Unexpected response from AirGradient', {'Content-Type': 'text/plain', 'response': 'Monitor set to accept only configuration from the cloud. Use property configurationControl to change.'})

home-assistant[bot] commented 3 weeks ago

Hey there @airgradienthq, @joostlek, mind taking a look at this issue as it has been labeled with an integration (airgradient) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `airgradient` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign airgradient` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


airgradient documentation airgradient source (message by IssueLinks)

joostlek commented 3 weeks ago

Oh huh, this is interesting, we are using that property to try to set it to local. So I am guessing the device is responding with this. You probably know how this works in the device itself, I will try to reproduce this tomorrow.

joostlek commented 3 weeks ago

https://github.com/airgradienthq/arduino/issues/174