rstrouse / ESPSomfy-RTS-HA

Control your somfy shades in Home Assistant
The Unlicense
102 stars 9 forks source link

Backup error #70

Closed open1999 closed 2 weeks ago

open1999 commented 2 weeks ago

Hello,

the backup service is broken. ESP HA v : 2.4.4 HA v: 2024.6.2

`Enregistreur: homeassistant.components.automation.backup_esp Source: helpers/script.py:526 intégration: Automatisation (documentation, problèmes) S'est produit pour la première fois: 18:02:48 (1 occurrences) Dernier enregistrement: 18:02:48

Backup_ESP: Error executing script. Unexpected error for call_service at pos 1: tuple index out of range Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/script.py", line 526, in _async_step await getattr(self, handler)() File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/script.py", line 763, in _async_call_service_step response_data = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/script.py", line 726, in _async_run_long_action return await long_task ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/homeassistant/core.py", line 2741, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/homeassistant/core.py", line 2784, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/service.py", line 977, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/service.py", line 1049, in _handle_entity_call result = await task ^^^^^^^^^^ File "/config/custom_components/espsomfy_rts/button.py", line 103, in async_press await method() File "/config/custom_components/espsomfy_rts/controller.py", line 601, in create_backup with open(file=fpath, mode="wb+") as f: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/homeassistant/util/loop.py", line 123, in protected_loop_func raise_for_blocking_call( File "/usr/local/lib/python3.12/site-packages/homeassistant/util/loop.py", line 42, in raise_for_blocking_call if check_allowed is not None and check_allowed(mapped_args): ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/homeassistant/block_async_io.py", line 28, in _check_file_allowed path = args[0] if type(args[0]) is str else str(args[0]) # noqa: E721


**IndexError: tuple index out of range**`
rstrouse commented 2 weeks ago

Yes I am aware. Use the GitHub update button in the ESPSomfy RTS interface to update. This is due to a change that HA did with their last update.

rstrouse commented 2 weeks ago

The integration has been updated in v2.4.5 to alleviate this error. Thanks @Jezza34000 for the assist.

open1999 commented 2 weeks ago

Tested backup, it's ok. Thanks.

rstrouse commented 2 weeks ago

Awesome! Thanks for the feedback.