Created
March 3, 2017 11:48
-
-
Save Landrash/dd27cf7387b1d265f575a0113de80c20 to your computer and use it in GitHub Desktop.
notification when home.
This file contains 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
- alias: 'Presence Notifications' | |
initial_state: 'off' | |
trigger: | |
- platform: state | |
entity_id: device_tracker.pixel_pixel, device_tracker.iphone_iphone | |
condition: | |
condition: and | |
conditions: | |
- condition: state | |
entity_id: input_boolean.stop_automation | |
state: 'off' | |
- condition: template | |
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}' | |
action: | |
- service: notify.pushnotify | |
data_template: | |
title: "Presence Notification" | |
message: > | |
{{ trigger.from_state.attributes.friendly_name }} just changed from | |
{{ trigger.from_state.state }} to {{ trigger.to_state.state }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment