Created
October 17, 2019 07:28
-
-
Save blacklight/b75b50bd5812d5d178315cf9a99fdc02 to your computer and use it in GitHub Desktop.
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
event.hook.OnHomePushData: | |
if: | |
type: platypush.message.event.pushbullet.PushbulletEvent | |
push_type: note | |
then: | |
- if ${body.startswith('HOME#') and body.split('HOME#')[1] == '1'}: | |
# Turn on the lights | |
- action: light.hue.on | |
# Say a welcome message | |
- | |
action: tts.say | |
args: | |
text: Welcome home, your_name | |
- if ${body.startswith('HOME#') and body.split('HOME#')[1] == '0'}: | |
# Turn off the lights | |
- action: light.hue.off | |
# Say a welcome message | |
- | |
action: tts.say | |
args: | |
text: your_name has left |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment