Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 865 Bytes

File metadata and controls

13 lines (9 loc) · 865 Bytes

This is python code to mess around with my lights

In order to use it, the first thing one needs to do is get a smartthings personal access token. Secondly, one must copy the .env.example file into a .env file. Copy your token and put it in your .env file (example can be found here.)

Running it

To get it working, go into LightControl.py, and run the program. This will give an output of all devices and their states. Find your desired device and add it to your .env file as the value for DEVICE_NAME.

Comment the line loop.run_until_complete( listDevices() ) and uncomment the line #weirdRandomLights(my_lights_object, device_name)

Run the program again and it should turn on and off the device specified in a semi-random manner.