Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Companion-App - Apple Watch - After rename script Error processing webhook #137095

Open
nicoh88 opened this issue Feb 1, 2025 · 0 comments
Open

Comments

@nicoh88
Copy link

nicoh88 commented Feb 1, 2025

The problem

Hello,

I use the Companion app and have installed the app on the Apple Watch.
To be able to use the app and execute things, “scenes” or “scripts” must be created in HA to control devices.

I did this for 6 devices and everything worked without any problems when I set up 2024. About 2 months ago I renamed a script and I think I also renamed the lighting group behind it. (a "_livingroom" was added)

Yesterday I finally got around to taking a closer look at the problem.

When I execute the entry (the script) via the Apple Watch, a check mark appears, but the script is not executed.

Error processing webhook b58222dd51f6cb93f99ae942ddbe35a85f2c6f98c7fc2b20234b83f945b722e8

If I run the script via the web interface or via the iPhone app, it works and everything happens as desired.

I have uninstalled and reinstalled the Apple Watch app - without success.
I have reset the Apple Watch configuration via the Home Assistant iPhone app - without success.
I have reset the Apple Watch configuration via the Home Assistant iPhone app in the menu “Debug” > “Reset database for app entities” and “Reset frontend cache” - without success.

I could uninstall the iPhone now, but I want to avoid it because otherwise I will have problems and additional cleanup effort with duplicate mobile devices, incorrect notification groups, etc.

Does anyone have any ideas?
It looks like the script has lost the link to the webhook after renaming.

Best regards
Nico

What version of Home Assistant Core has the issue?

core-2025.1.4

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

No response

Link to integration documentation on our website

No response

Diagnostics information

Logger: homeassistant.components.webhook
Quelle: components/webhook/__init__.py:192
Integration: Webhook (Dokumentation, Probleme)
Erstmals aufgetreten: 31. Januar 2025 um 21:58:57 (52 Vorkommnisse)
Zuletzt protokolliert: 06:40:29

Error processing webhook b58222dd51f6cb93f99ae942ddbe35a85f2c6f98c7fc2b20234b83f945b722e8
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 283, in webhook_call_service
    await hass.services.async_call(
    ...<5 lines>...
    )
  File "/usr/src/homeassistant/homeassistant/core.py", line 2728, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Action script.indirekte_beleuchtung_wohnzimmer not found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 192, in async_handle_webhook
    response: Response | None = await webhook["handler"](hass, webhook_id, request)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 265, in handle_webhook
    return await asyncio.shield(
           ^^^^^^^^^^^^^^^^^^^^^
        WEBHOOK_COMMANDS[webhook_type](hass, config_entry, webhook_payload)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 175, in validate_and_run
    return await func(hass, config_entry, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 299, in webhook_call_service
    raise HTTPBadRequest from ex
aiohttp.web_exceptions.HTTPBadRequest: Bad Request
Logger: homeassistant.components.mobile_app.webhook
Quelle: components/mobile_app/webhook.py:291
Integration: Mobile-App (Dokumentation, Probleme)
Erstmals aufgetreten: 31. Januar 2025 um 21:58:57 (60 Vorkommnisse)
Zuletzt protokolliert: 16:13:11

Error when calling service during mobile_app webhook (device name: nh` iPhone): Action script.indirekte_beleuchtung_wohnzimmer not found
Image

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant