feat(overkiz): fire event on execution failure for retry logic#173155
feat(overkiz): fire event on execution failure for retry logic#173155NicolasRoehm wants to merge 1 commit intohome-assistant:devhome-assistant/core:devfrom NicolasRoehm:feat/expose-execution-failureNicolasRoehm/core:feat/expose-execution-failureCopy head branch name to clipboard
Conversation
There was a problem hiding this comment.
Hello @NicolasRoehm,
When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es).
The commits that are missing a linked GitHub account are the following:
eea4e78e01bcb2100c26025ae858617946e8a068- This commit has something that looks like an email address (nicolas@roehm.dev). Maybe try linking that to GitHub?.
Unfortunately, we are unable to accept this pull request until this situation is corrected.
Here are your options:
-
If you had an email address set for the commit that simply wasn't linked to your GitHub account you can link that email now and it will retroactively apply to your commits. The simplest way to do this is to click the link to one of the above commits and look for a blue question mark in a blue circle in the top left. Hovering over that bubble will show you what email address you used. Clicking on that button will take you to your email address settings on GitHub. Just add the email address on that page and you're all set. GitHub has more information about this option in their help center.
-
If you didn't use an email address at all, it was an invalid email, or it's one you can't link to your GitHub, you will need to change the authorship information of the commit and your global Git settings so this doesn't happen again going forward. GitHub provides some great instructions on how to change your authorship information in their help center.
- If you only made a single commit you should be able to run
(substituting "Author Name" and "
git commit --amend --author="Author Name <email@address.com>"email@address.com" for your actual information) to set the authorship information. - If you made more than one commit and the commit with the missing authorship information is not the most recent one you have two options:
- You can re-create all commits missing authorship information. This is going to be the easiest solution for developers that aren't extremely confident in their Git and command line skills.
- You can use this script that GitHub provides to rewrite history. Please note: this should be used only if you are very confident in your abilities and understand its impacts.
- Whichever method you choose, I will come by to re-check the pull request once you push the fixes to this branch.
- If you only made a single commit you should be able to run
We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community.
Thanks, I look forward to checking this PR again soon! ❤️
|
Hey there @iMicknl, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR enhances the Overkiz integration's execution state change handler by adding failure logging and firing a Home Assistant bus event when an execution fails, providing better observability for failed commands.
Changes:
- Refactored the early-return logic to exit immediately when
exec_idis not tracked - Added a warning log with execution details (device URL, command name, failure type) on execution failure
- Added firing an
overkiz_execution_failedbus event with failure details for downstream consumers
| execution.get("device_url", "unknown"), | ||
| execution.get("command_name", "unknown"), |
| coordinator.hass.bus.async_fire( | ||
| "overkiz_execution_failed", |
eea4e78 to
00e90bf
Compare
There was a problem hiding this comment.
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
00e90bf to
f6d4ec7
Compare
|
@home-assistant add-label new-feature |
|
@home-assistant ready-for-review |
f6d4ec7 to
a2d3071
Compare
When a device command fails (e.g. Somfy IO motor unreachable), the integration silently discarded the failure. This logs a warning and fires a 'overkiz_execution_failed' event so automations can react.
a2d3071 to
ae91525
Compare
iMicknl
left a comment
There was a problem hiding this comment.
@NicolasRoehm thanks for your contribution! This is a valid change, but please do use the original pull request template. This feels like an AI generated PR.
If possible, please add tests.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Proposed change
When a device command fails to execute (e.g. a Somfy IO motor is temporarily unreachable), the Overkiz integration silently drops the failure — the execution is removed from the coordinator dict with no log entry, no HA event, and no way for automations to react.
This is particularly problematic for covers/shutters where the only workaround today is polling
current_positionafter a delay, which produces false positives when users manually operate the shutter with a physical remote between the command and the check.What this PR does
In
on_execution_state_changed(), whennew_state == ExecutionState.FAILED:exec_id,device_url,command_name, andfailure_typeoverkiz_execution_failedevent on the HA event bus with all available failure data (device_url,command_name,failure_type,failure_type_code)Why this matters
The
ExecutionStateChangedEventfrom the Overkiz API already carries rich failure information (failed_commands,failure_type,failure_type_code) — it was simply being discarded. This PR surfaces that data so users can build reliable automations.Example automation (after this PR is merged)
Breaking change
None. This is purely additive — it adds a log line and an event that existing code can safely ignore.
Testing
Related issue
None yet — this PR is prompted by real-world experience with Somfy IO shutters where commands occasionally fail due to temporary radio interference and currently go undetected.