HABApp: Import other rules

Hello,

for some reason I have to import a rule from another rule. But whatever package/module combination I provide it fails with:
Error "No module named 'lightsrules'" in load

I tried:

  • from lightsrules import *
  • from .lightsrules import *
  • from rules.lightsrules import *

Is there any way to make it work? Looks like HABApp treats rule differently for automatic loading of changes.

Best regards, Acema

try this:
https://habapp.readthedocs.io/en/latest/rule.html#how-to-properly-use-rules-from-other-rule-files

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.