Skip to content

Instantly share code, notes, and snippets.

@LarsBergqvist
Last active November 10, 2017 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LarsBergqvist/8d07155611162670fad22d09afd1af1a to your computer and use it in GitHub Desktop.
Save LarsBergqvist/8d07155611162670fad22d09afd1af1a to your computer and use it in GitHub Desktop.
A Home Assistant automation rule with a condition
automation:
alias: Notify Lars when door is opened
trigger:
platform: state
entity_id: sensor.front_door_opened
condition:
condition: state
entity_id: device_tracker.larsiphone
state: not_home
action:
service: notify.ios_larsiphone
data:
message: The front door has been opened!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment