Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/google/python-laurel
Python control of C by GE Bluetooth lightbulbs
https://github.com/google/python-laurel
Last synced: 12 days ago
JSON representation
Python control of C by GE Bluetooth lightbulbs
- Host: GitHub
- URL: https://github.com/google/python-laurel
- Owner: google
- License: apache-2.0
- Archived: true
- Created: 2018-12-06T21:29:29.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-20T20:26:23.000Z (almost 4 years ago)
- Last Synced: 2024-08-01T16:55:23.437Z (3 months ago)
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 57
- Watchers: 12
- Forks: 17
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Python control of C by GE Bluetooth lightbulbs
==============================================A simple Python API for controlling [C by GE](https://www.cbyge.com/) lighting devices.
This is not an officially supported Google product.
Example use
-----------Retrieve authentication data from the remote API and automatically create devices:
```
import laureldevices = laurel.laurel("username", "password")
```Show device information:
```
print(devices[0].name)
print(devices[0].id)
print(devices[0].type)
print(devices[0].brightness)
print(devices[0].temperature)
```Set the device brightness to 50%:
```
devices[0].set_brightness(50)
```If the device supports colour temperature setting:
```
if devices[0].supports_temperature == True:
devices[0].set_temperature(50)
```Turn the device off:
```
devices[0].set_power(False)
```Force an update of the device state (note that this is asynchronous):
```
devices[0].update_status()
```