Skip to content

Commit

Permalink
Stop removing remotes when setup fails
Browse files Browse the repository at this point in the history
This change removes a mis-feature that tried to remove Pico remotes if
they disappeared from the bridge. Not only did I fuck up the actual
implementation, it seems like kind of a weird idea in retrospect.
Removing devices should be an exceptionally rare occurrence.

Fixes #22
  • Loading branch information
thenewwazoo committed Feb 6, 2022
1 parent 0539cfa commit 97ac63c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ The authn strings are newline-escaped versions of the files you generated.

In order to add a device to the hub, you must use the Lutron app to pair the device. This plugin will re-scan the known devices 30 seconds after you announce the device. This means you must **complete adding the device in less than 30 seconds** in order for the device to appear in HomeKit without restarting the plugin. If you _do_ miss that deadline, don't worry: the device will appear after you restart Homebridge.

If you remove a **Pico Remote** device from the hub, it will disappear from Homekit after the next time you restart Homebridge.

If you remove **any other device type** (by which, I suppose, I mean a Serena blind), you must [delete the cached accessory out of Homebridge manually](https://github.com/oznu/homebridge-config-ui-x/issues/525).
To remove a device from Homebridge after you're removed it from the Smart Bridge 2, you must [delete the cached accessory out of Homebridge manually](https://github.com/oznu/homebridge-config-ui-x/issues/525).

### Pico Remote Button Mapping

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Lutron Caseta LEAP",
"name": "homebridge-lutron-caseta-leap",
"version": "2.2.1",
"version": "2.2.2",
"description": "Support for the Lutron Caseta Smart Bridge 2 (non-pro)",
"license": "Apache-2.0",
"repository": {
Expand Down
2 changes: 0 additions & 2 deletions src/PicoRemote.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Service, PlatformAccessory } from 'homebridge';

import { LutronCasetaLeap } from './platform';
import { PLUGIN_NAME, PLATFORM_NAME } from './settings';
import { ExceptionDetail, OneButtonStatusEvent, Response, SmartBridge } from 'lutron-leap';

import { inspect } from 'util';
Expand Down Expand Up @@ -174,7 +173,6 @@ export class PicoRemote {
.then(() => this.platform.log.info('Finished setting up Pico remote', fullName))
.catch((e) => {
this.platform.log.error('Failed setting up Pico remote:', e);
platform.api.unregisterPlatformAccessories(PLUGIN_NAME, PLATFORM_NAME, [accessory]);
});

this.platform.on('unsolicited', this.handleUnsolicited.bind(this));
Expand Down

0 comments on commit 97ac63c

Please sign in to comment.