Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Config Support]: Notification Message Using Zone Variable #43

Closed
NicholasFlamy opened this issue Jun 1, 2023 · 4 comments
Closed

[Config Support]: Notification Message Using Zone Variable #43

NicholasFlamy opened this issue Jun 1, 2023 · 4 comments

Comments

@NicholasFlamy
Copy link

NicholasFlamy commented Jun 1, 2023

Describe the problem you are having or the outcome you are trying to achieve.

I want to have a message as part of the notification that is different based on what zone the object is in.

Example:
A person was detected on the Front Porch. (Likely would look something like this: "A {{ label }} was detected {{ 'on the Front Porch.' if zone = 'frontporcharea' 'in the Front yard.' if zone = 'frontyardarea' }}"

How would I do this?

Version

0.12.0.1

@SgtBatten
Copy link
Owner

SgtBatten commented Jun 2, 2023

A {{ label }} was detected {{ 'on the Front Porch.' if 'frontporcharea' in entered_zones else 'in the Front yard.' if 'frontyardarea' in entered_zones }}

But you need to update to beta 1e which i will release in 2 minutes.

@NicholasFlamy
Copy link
Author

NicholasFlamy commented Jun 2, 2023

If I wanted one more option would I add else again like this?:

A {{ label }} was detected {{ 'on the Front Porch.' if 'frontporcharea' in entered_zones else 'in the Front yard.' if 'frontyardarea' in entered_zones else 'in the driveway.' if 'driveway' in entered_zones }}

@SgtBatten
Copy link
Owner

Yep

@NicholasFlamy
Copy link
Author

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants