Merge branch 'dev' of https://github.com/icanos/hassio-plejd into dev
This commit is contained in:
commit
bde7a473be
3 changed files with 20 additions and 7 deletions
16
README.md
16
README.md
|
|
@ -33,7 +33,7 @@ The add-on has been tested on the following platforms:
|
|||
Browse to your Home Assistant installation in a web browser and click on `Hass.io` in the navigation bar to the left.
|
||||
* Open the Home Assistant web console and click `Hass.io` in the menu on the left side.
|
||||
* Click on `Add-on Store` in the top navigation bar of that page.
|
||||
* Paste the URL to this repo https://github.com/icanos/hassio-plejd/ in the `Add new repository by URL` field and hit `Add`.
|
||||
* Paste the URL to this repo https://github.com/icanos/hassio-plejd.git in the `Add new repository by URL` field and hit `Add`.
|
||||
* Scroll down and you should find a Plejd add-on that can be installed. Open that and install.
|
||||
* Enjoy!
|
||||
|
||||
|
|
@ -52,10 +52,9 @@ Browse your Hass.io installation using a tool that allows you to manage files, f
|
|||
You need to add the following to your `configuration.yaml` file:
|
||||
```
|
||||
mqtt:
|
||||
broker: [point to your broker IP]
|
||||
broker: [point to your broker IP eg. 'mqtt://localhost']
|
||||
username: [username of mqtt broker]
|
||||
password: !secret mqtt_password
|
||||
client_id: mqtt
|
||||
discovery: true
|
||||
discovery_prefix: homeassistant
|
||||
birth_message:
|
||||
|
|
@ -88,10 +87,15 @@ Check this out for more information on how you can get your Plejd lights control
|
|||
https://www.home-assistant.io/integrations/homekit/
|
||||
|
||||
## Changelog
|
||||
*0.1.4*:
|
||||
* FIX: bug preventing add-on from building
|
||||
*v 0.1.1*:
|
||||
* FIX: Fixed missing reference on startup, preventing add-on from starting
|
||||
|
||||
*0.1.3*:
|
||||
*v 0.1.0*:
|
||||
* NEW: Rewrote the BLE integration for more stability
|
||||
* FIX: discovery wasn't always sent
|
||||
|
||||
*previous*:
|
||||
* FIX: bug preventing add-on from building
|
||||
* NEW: Added support for Plejd devices with multiple outputs (such as DIM-02)
|
||||
|
||||
## License
|
||||
|
|
|
|||
|
|
@ -92,7 +92,12 @@ class PlejdService extends EventEmitter {
|
|||
|
||||
let i = 0;
|
||||
const transitionRef = setInterval(() => {
|
||||
this._turnOn(id, parseInt((brightnessStep * i) + 1));
|
||||
let currentBrightness = parseInt((brightnessStep * i) + 1);
|
||||
if (currentBrightness > 254) {
|
||||
currentBrightness = 254;
|
||||
}
|
||||
|
||||
this._turnOn(id, currentBrightness);
|
||||
|
||||
if (i >= steps) {
|
||||
clearInterval(transitionRef);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,11 @@ const mqtt = require('./mqtt');
|
|||
const fs = require('fs');
|
||||
const PlejdService = require('./ble');
|
||||
|
||||
const version = "0.2.0";
|
||||
|
||||
async function main() {
|
||||
console.log('starting Plejd add-on v. ' + version);
|
||||
|
||||
const rawData = fs.readFileSync('/data/plejd.json');
|
||||
const config = JSON.parse(rawData);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue