An open API service indexing awesome lists of open source software.

https://github.com/netbeast/react-native-yeelight

Yeelight controller for react native
https://github.com/netbeast/react-native-yeelight

react-native xiaomi-smart-home yeelight-wifi

Last synced: about 1 month ago
JSON representation

Yeelight controller for react native

Awesome Lists containing this project

README

          

# yeelight-wifi
[![CircleCI](https://circleci.com/gh/pmdroid/yeelight-wifi.svg?style=svg)](https://circleci.com/gh/pmdroid/yeelight-wifi)
[![codecov](https://codecov.io/gh/pmdroid/yeelight-wifi/branch/master/graph/badge.svg)](https://codecov.io/gh/pmdroid/yeelight-wifi)

The [Yeelight WiFi Lib](https://github.com/pmdroid/yeelight-wifi) docs are located [here](https://pmdroid.github.io/yeelight-wifi/).

Using npm:
```shell
$ npm i --save yeelight-wifi
```

In Node.js:
```js
const YeelightSearch = require('yeelight-wifi');

const yeelightSearch = new YeelightSearch();
yeelightSearch.on('found', (lightBulb) => {
lightBulb.toggle()
.then(() => {
console.log('toggled');
})
.catch((err) => {
console.log(`received some error: ${err}`);
});
});
```