Skip to content

Instantly share code, notes, and snippets.

@athena15
Created December 12, 2018 23:05
Show Gist options
  • Save athena15/8f9eac6a4cac7b9113c26cb182d3cdb2 to your computer and use it in GitHub Desktop.
Save athena15/8f9eac6a4cac7b9113c26cb182d3cdb2 to your computer and use it in GitHub Desktop.
if smart_home:
if prediction == 'Palm':
try:
action = "Lights on, music on"
sonos.play()
# turn off smart home actions if devices are not responding
except ConnectionError:
smart_home = False
pass
# etc. etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment