This app scrapes the metadata of Rule Machine and Button Controller rules and reports on the presence, absence, or non-detected state of the following actions within all rules:
- While
- Repeat
- End Repeat [count should match Repeat count, but a mismatch indicates a mis-coded rule]
- Stop Repeat
- Wait for Expression
- Wait for Event
The conditional actions noted above have sometimes given me fits, and when I learn a thing or two in one rule about better approaches to using such actions, it has never been easy remembering what other rules (I have over 300 on my main hub alone) might benefit from a similar approach. Hence this app.
The app only generates a report, it cannot change any rule metadata.
With large rule sets, the time to scan grows substantially, and it may take 5-10 minutes to go through a scan. I've also noticed that a second scan often picks up more "hits" on the keywords being searched; I suspect that timeouts vary depending on hub load.
This app can put a large load on your hub.
Link to github:
https://raw.githubusercontent.com/JohnFLand/Rules-Special-Actions-Scanner/refs/heads/main/Rules_Special_Actions_Scanner.groovy
