Created
December 22, 2019 06:05
-
-
Save NotExactlyMeerkat/28d9ab7458362026b71b591a27af7118 to your computer and use it in GitHub Desktop.
Feeder alarm
This file contains hidden or 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
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