frenck / spook

A scary 👻 powerful toolbox 🧰 for Home Assistant 🏡
https://spook.boo
MIT License
381 stars 36 forks source link

Incorrectly Flags ZHA Service Errors on Startup #636

Closed 16-9 closed 1 month ago

16-9 commented 2 months ago

What version of Spook are you using?

2.2.2

What version of Home Assistant are you using?

2024.2.3

The problem

Upon starting Home Assistant, I consistently encounter errors reported by Spook related to the zha.issue_zigbee_cluster_command service. The specific error message is:

"The automation 'Poll Sump Pump Switch' (automation.poll_sump_pump_switch) has an action that calls an unknown service: zha.issue_zigbee_cluster_command. This error prevents the automation from running correctly."

However, zha.issue_zigbee_cluster_command is indeed known and available within the ZHA integration, suggesting that the error is not due to a missing service or a typo. The pattern of these errors strongly indicates that Spook is performing its checks before the ZHA integration (SkyConnect Multi-PAN, 64 devices and 1685 entities) has fully initialized and registered its services with Home Assistant. As a result, Spook reports these services as unknown erroneously.

Expected Behavior: Spook should recognize all valid services provided by integrations once they are fully initialized, including zha.issue_zigbee_cluster_command, without reporting them as errors.

Actual Behavior: Spook prematurely reports errors for valid ZHA services during the startup sequence of Home Assistant, indicating that these services are unknown. This seems to occur possibly because Spook's evaluation happens before the ZHA integration has completed its initialization process, leading to false error reports.

Anything in the logs? Paste it here!

No response

16-9 commented 1 month ago

Confirmed it is now gone. Thanks