lifx_http_api 0.0.11+2 copy "lifx_http_api: ^0.0.11+2" to clipboard
lifx_http_api: ^0.0.11+2 copied to clipboard

outdated

A dart implementation of the LIFX HTTP API for smart LED bulbs.

example/main.dart

import 'package:lifx_http_api/lifx_http_api.dart';

var client = Client('YOUR_LIFX_CLOUD_API_KEY');

void main() async {
  // Get all lights
  Iterable<Bulb> lights = await client.listLights();
  // Change bulb power (should be "on" or "off")
  await client.setState('bulb-id-goes-here', power: "on");
  // Change bulb brightness (shoud be between 0.0 and 1.0)
  await client.setState('bulb-id-goes-here', brightness: 0.5);
}
3
likes
0
pub points
4%
popularity

Publisher

unverified uploader

A dart implementation of the LIFX HTTP API for smart LED bulbs.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

cli_repl, dotenv, http, json_annotation, json_serializable, lint, meta

More

Packages that depend on lifx_http_api