Skip to content

Instantly share code, notes, and snippets.

@NotExactlyMeerkat
Created December 22, 2019 06:05
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 NotExactlyMeerkat/28d9ab7458362026b71b591a27af7118 to your computer and use it in GitHub Desktop.
Save NotExactlyMeerkat/28d9ab7458362026b71b591a27af7118 to your computer and use it in GitHub Desktop.
Feeder alarm
import requests
import json
import time
from pushbullet.pushbullet import PushBullet
key = "[SUBJECT PUSHBULLET KEY HERE]"
p = PushBullet(key)
devices = p.getDevices()
contacts = p.getContacts()
timecur = time.strftime("%H:%M:%S")
#timecur4test = "19:00:00"
while timecur != "19:00:00" or "06:40:00" or "12:00:00" or "20:00:00":
time.sleep(1)
print("still not")
if timecur == "19:00:00":
p.pushNote(devices[0]["iden"], 'Feed the turtles!', 'Do it!')
elif timecur == "06:40:00" or "12:00:00" or "20:00:00":
p.pushNote(devices[0]["iden"], 'Feed your cat!', 'Do it!')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment