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
72.54k stars 30.35k forks source link

Netatmo: set_schedule service does not work anymore #104634

Closed se7en-ei8ht closed 1 month ago

se7en-ei8ht commented 10 months ago

The problem

For a few days now, the set_schedule service of the Netatmo integration always responds with two error when called.

What version of Home Assistant Core has the issue?

core-2023.11.3

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

Netatmo

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

service: netatmo.set_schedule
data:
  schedule_name: myScheduleName
target:
  entity_id: climate.room

Anything in the logs that might be useful for us?

FIRST ERROR =======================================================================================

Logger: homeassistant.helpers.script.websocket_api_script
Source: helpers/script.py:468
First occurred: 27 novembre 2023 alle ore 22:58:49 (7 occurrences)
Last logged: 10:45:57

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: '5b52122a8e1782a0858c36eb'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 704, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action
    return long_task.result()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2035, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2072, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 830, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call
    response_data = await _handle_entity_call(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/netatmo/climate.py", line 408, in _async_service_set_schedule
    for sid, schedule in self.hass.data[DOMAIN][DATA_SCHEDULES][
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '5b52122a8e1782a0858c36eb'

SECOND ERROR =======================================================================================

Logger: homeassistant.components.websocket_api.http.connection
Source: components/netatmo/climate.py:408
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 27 novembre 2023 alle ore 22:58:49 (7 occurrences)
Last logged: 10:45:57

[546865771456] Error handling message: Unknown error (unknown_error) Leonardo from 192.168.1.236 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15)
[546840827072] Error handling message: Unknown error (unknown_error) Leonardo from 192.168.1.236 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15)
[546939902912] Error handling message: Unknown error (unknown_error) Leonardo from 192.168.1.236 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15)
[546866970048] Error handling message: Unknown error (unknown_error) Leonardo from 192.168.1.236 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15)
[546935212608] Error handling message: Unknown error (unknown_error) Leonardo from 185.49.212.4 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 OPR/104.0.0.0)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 731, in handle_execute_script
    script_result = await script_obj.async_run(msg.get("variables"), context=context)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1578, in async_run
    return await asyncio.shield(run.async_run())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 420, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 470, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 493, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 704, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action
    return long_task.result()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2035, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2072, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 830, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call
    response_data = await _handle_entity_call(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/netatmo/climate.py", line 408, in _async_service_set_schedule
    for sid, schedule in self.hass.data[DOMAIN][DATA_SCHEDULES][
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '5b52122a8e1782a0858c36eb'

Additional information

No response

home-assistant[bot] commented 10 months ago

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

Code owner commands Code owners of `netatmo` 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 netatmo` 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)


netatmo documentation netatmo source (message by IssueLinks)

se7en-ei8ht commented 10 months ago

As of this morning, the service call is working again. Perhaps it was a problem on Netamo's side.

cgtobi commented 10 months ago

I'll close this. Should this happen again please let us know.

se7en-ei8ht commented 10 months ago

@cgtobi I spoke too soon. The problem has come back since this morning. I still think it is a problem on Netatmo's part. The error given in the Logs is the same one I reported in the first post.

pantera8989 commented 10 months ago

Since 14 hours I have an issue with the set_temperature service call. It sets the temperature, but the boiler won't start up. Even if I try it with the original app it doesn't work. I think netatmo has serious problems.

SupercowsNL commented 9 months ago

Same issue here. I have removed and added the Netatmo integration and now this setting is totally gone.

Before removing it is was greyed out/not working: This entity is no longer being provided by the netatmo integration. If the entity is no longer in use, delete it in settings.

cgtobi commented 9 months ago

Does this functionality still work via the Netatmo web interface and/or app?

se7en-ei8ht commented 9 months ago

Does this functionality still work via the Netatmo web interface and/or app?

It definitely works through the Netatmo Energy app. I don't know through the web interface.

SupercowsNL commented 9 months ago

It is still available and possible through the website. I can change it there.

cgtobi commented 9 months ago

I just tried myself and (unfortunately) was not able to reproduce. The service did not yield errors and changed the schedule as expected. The service expects the the schedule name, not the ID.

SupercowsNL commented 9 months ago

I have deleted and added the netatmo integration in HA this morning and I can change this setting again. Yesterday I did this about 6 times without the setting being available. Looks something at the end of Netatmo?

cgtobi commented 9 months ago

That could well be

se7en-ei8ht commented 9 months ago

I have deleted and added the netatmo integration in HA this morning and I can change this setting again. Yesterday I did this about 6 times without the setting being available. Looks something at the end of Netatmo?

~~I've just tried removing and reinstalling the integration but still getting the same error as described in the first post. The only strange thing I've noticed is that in the settings on Netatmo's website under "App partner" section I got two instances of Home assistant cloud. It is the same for you?~~

Made another attempt restarting Home assistant between removing and reinstalling the integration, and this time it seems to have worked. Anyway I suggest to wait few days before marking this issue as closed.

nightfever77 commented 7 months ago

Getting unknown error when calling netatmo.set_schedule since a couple of days. Debug enabled but no more output than this:

File "/usr/src/homeassistant/homeassistant/components/netatmo/climate.py", line 451, in _async_service_set_schedule for sid, schedule in self.hass.data[DOMAIN][DATA_SCHEDULES][ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: '60b0aedb2d4e87192f7c0f55'

issue-triage-workflows[bot] commented 4 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment πŸ‘ This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

se7en-ei8ht commented 4 months ago

πŸ‘πŸΌ

issue-triage-workflows[bot] commented 1 month ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment πŸ‘ This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.