lifx_http_api 0.0.17 copy "lifx_http_api: ^0.0.17" to clipboard
lifx_http_api: ^0.0.17 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 = LIFXClient('YOUR_LIFX_CLOUD_API_KEY');

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

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (LICENSE)

Dependencies

cli_repl, dotenv, http, json_annotation

More

Packages that depend on lifx_http_api