Last active
July 10, 2024 13:34
-
-
Save letsautomatenet/9c84d96eef95592cca87090eb7b0c734 to your computer and use it in GitHub Desktop.
Create Zone of current phone location
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create this script and then add a card to the dashboard linking to the script | |
alias: Add New Zone | |
sequence: | |
- service: zone.create | |
metadata: {} | |
data: | |
radius: "{{radius|default(100)}}" | |
name: "{{zone_name}}" | |
latitude: "{{ state_attr('device_tracker.marc_phone','latitude') }}" | |
longitude: "{{ state_attr('device_tracker.marc_phone','longitude') }}" | |
description: "" | |
fields: | |
zone_name: | |
selector: | |
text: null | |
name: Zone Name | |
required: true | |
radius: | |
selector: | |
number: | |
min: 50 | |
max: 500 | |
step: 50 | |
name: Radius | |
default: 100 | |
required: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment