-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
KeyError: 'idx' in HomeKit .../homekit/type_triggers.py", line 97, in async_trigger #95015
Comments
Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) homekit documentation |
Please restart with debug logging enabled for homekit and post a new full log. Thanks 👍 |
Sure :) Here it is. Thank you for taking a look. home-assistant_2023-06-21T21-45-58.382Z.log [EDIT] |
KNX isn't passing on the trigger data so it can't find the trigger. This should fix knx: diff --git a/homeassistant/components/knx/device_trigger.py b/homeassistant/components/knx/device_trigger.py
index 8a074b43b7..1abafb221d 100644
--- a/homeassistant/components/knx/device_trigger.py
+++ b/homeassistant/components/knx/device_trigger.py
@@ -84,6 +84,7 @@ async def async_attach_trigger(
trigger_info: TriggerInfo,
) -> CALLBACK_TYPE:
"""Attach a trigger."""
+ trigger_data = trigger_info["trigger_data"]
dst_addresses: list[str] = config.get(EXTRA_FIELD_DESTINATION, [])
job = HassJob(action, f"KNX device trigger {trigger_info}")
knx: KNXModule = hass.data[DOMAIN]
@@ -95,7 +96,7 @@ async def async_attach_trigger(
return
hass.async_run_hass_job(
job,
- {"trigger": telegram},
+ {"trigger": {**trigger_data, **telegram}},
)
return knx.telegrams.async_listen_telegram( |
Hey there @Julius2342, @farmio, @marvin-w, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) knx documentation |
Thank you very much @bdraco 😃 |
Wow, that was quick. Thanks a lot |
The problem
In my protocol of home assistant core, there are loads of such Key-Errors
The full log of the first minutes of my HA instance contains 170 of those errors. The full log is available here.
It seems that there is exactly one those Error for each telegram coming from the KNX bus/integration (See its config.
What version of Home Assistant Core has the issue?
core-2023.6.2
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
HomeKit
Link to integration documentation on our website
https://www.home-assistant.io/integrations/homekit/
Diagnostics information
config_entry-homekit-2048d7074690a063c2d5399508f7410b.json.txt
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
Could possible the idx default to 0 in case it is missing?
The text was updated successfully, but these errors were encountered: