lifx_http_api 0.0.15 copy "lifx_http_api: ^0.0.15" to clipboard
lifx_http_api: ^0.0.15 copied to clipboard

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

More

Packages that depend on lifx_http_api