constrain_presence and person=true
Please forgive me if I am wrong, with appdaemon4 I saw that the person=true parameter was added to the constraints for the callbacks.
I would like to use it from the configuration file in order to completely disable an app to run.
Is it possible? There are some arguments that I need to apply like the person=true in the callback constraint? In that case, how can I apply it?
thank you in advance Andrea
with appdaemon4 I saw that the person=true parameter was added to the constraints for the callbacks.
i think you mix things up. because constraints are parameters and they dont have parameters. so i wonder where you saw that.
i think what you are looking for are the normal constraints: https://appdaemon.readthedocs.io/en/latest/APPGUIDE.html#callback-constraints
those can be in the yaml or in the listener or schedular function.
and if those are not good enough there is the option to create custom constraints: https://appdaemon.readthedocs.io/en/latest/APPGUIDE.html#custom-constraints
Hi, thank you for your reply...
My question is related to the callback constraints as you referred in the first link.
And in detail to this: https://appdaemon.readthedocs.io/en/latest/APPGUIDE.html#presence
I read this issue #980 where a new infrastructure that is able to use the Person from Home Assistant was introduced and for being able to use the methods self.noone_home(): and friends you have to pass a param to the method "self.noone_home(person=True)" like this.
So my question is basically related to:
- there is a way for use noone_home and friends with Person Home Assistant entities
- is there a way for use the same logic also for the constraints defined in yaml?
- is yaml code only intended to be used with tracked devices?
thank you again Andrea
Hi there - so far the "person=True" function only works on the api calls such as anyone_home() - we will add support for callback and app level constraints in a future release.
the noone_home() and friends functions are not related to constraints. so there is no perso=True option for that.
there need to be new seperate constraints for person.
but Andrew just said that it will be added.
Thank you both for the kind reply.
All clear.