HelloThisIsFlo/Appdaemon-Test-Framework

Custom Constraints

bachya opened this issue · 0 comments

AppDaemon 3.x allows for the creation of custom constraints:

self.register_constraint('constrain_cloudy')

However, Appdaemon-Test-Framework doesn't seem to understand them:

self = <settings.apps.hass.TestApp object at 0x10d11c780>, name = 'constrain_cloudy'

    def register_constraint(self, name):
>       self.constraints.append(name)
E       AttributeError: 'AutoVacationMode' object has no attribute 'constraints'

I assume that this needs to be patched somehow, but I'm clueless on this one. 😆 Any thoughts?

EDIT: Actually, I think it might be pretty straightforward; we'll see. Submitted a PR; appreciate your review!