Hi mafe,
yes - it’s very easy and there are several possibilities:
The most recommended is that you can run HABApp on your local machine and connect to openhab in read only mode. Then you use an IDE and set break points in your rules and debug them as a normal python program. Once you are done just copy the rule file to the mounted docker share and it becomes live.
My recommendation is always running the rule on a local machine first (once you’re more secure you can skip the read only mode) because you can use all the local helpers (IDE, type-checkers, etc.).
I also suggest you use loggers since HABApp comes with native python logging support out of the box.
You’ll see the logger definitions in the logging.yml
, add your own filehandler and loggers there.
The most important point is using an IDE. I can’t emphasize this enough. I go through all this trouble and annotate everything so you get live type hints, auto-complete and error checks in the IDE.
Edit:
Also check out the MultiModeItem once your comfortable with HABApp. It’s a huge time saver and makes overlapping states really easy.