Skip to content

Commit

Permalink
Removing EasyNameable (hidden API)
Browse files Browse the repository at this point in the history
  • Loading branch information
aholstenson committed Jan 24, 2018
1 parent dacac58 commit 18002a7
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 20 deletions.
4 changes: 2 additions & 2 deletions lib/devices/air-monitor.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { EasyNameable, ChargingState } = require('abstract-things');
const { ChargingState } = require('abstract-things');
const { AirMonitor } = require('abstract-things/climate');
const MiioApi = require('../device');

Expand All @@ -9,7 +9,7 @@ const BatteryLevel = require('./capabilities/battery-level');
const { AQI } = require('./capabilities/sensor');

module.exports = class extends AirMonitor
.with(EasyNameable, MiioApi, Power, AQI, BatteryLevel, ChargingState)
.with(MiioApi, Power, AQI, BatteryLevel, ChargingState)
{

static get type() {
Expand Down
3 changes: 1 addition & 2 deletions lib/devices/air-purifier.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

const { EasyNameable } = require('abstract-things');
const { AirPurifier } = require('abstract-things/climate');
const MiioApi = require('../device');

Expand All @@ -19,7 +18,7 @@ const { Temperature, Humidity, AQI } = require('./capabilities/sensor');
* device.
*/
module.exports = class extends AirPurifier
.with(EasyNameable, MiioApi, Power, Mode, Temperature, Humidity, AQI,
.with(MiioApi, Power, Mode, Temperature, Humidity, AQI,
SwitchableLED, LEDBrightness, Buzzer)
{

Expand Down
4 changes: 2 additions & 2 deletions lib/devices/chuangmi.plug.v1.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict';

const { Thing, EasyNameable, SwitchablePower } = require('abstract-things');
const { Thing, SwitchablePower } = require('abstract-things');
const { PowerPlug, PowerOutlet } = require('abstract-things/electrical');

const MiioApi = require('../device');
const MiioPower = require('./capabilities/power');

module.exports = class extends Thing.with(PowerPlug, PowerOutlet, MiioApi, MiioPower, EasyNameable) {
module.exports = class extends Thing.with(PowerPlug, PowerOutlet, MiioApi, MiioPower) {
static get type() {
return 'miio:power-plug';
}
Expand Down
4 changes: 2 additions & 2 deletions lib/devices/eyecare-lamp2.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

const MiioApi = require('../device');

const { Children, EasyNameable } = require('abstract-things');
const { Children } = require('abstract-things');
const { Light, Dimmable, SwitchablePower } = require('abstract-things/lights');
const { percentage } = require('abstract-things/values');

const MiioDimmable = require('./capabilities/dimmable');
const MiioPower = require('./capabilities/power');

module.exports = class EyecareLamp2 extends Light
.with(MiioPower, MiioDimmable, Children, MiioApi, EasyNameable)
.with(MiioPower, MiioDimmable, Children, MiioApi)
{

constructor(options) {
Expand Down
4 changes: 2 additions & 2 deletions lib/devices/gateway.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { Thing, EasyNameable, Children } = require('abstract-things');
const { Thing, Children } = require('abstract-things');
const { ChildSyncer } = require('abstract-things/children');

const MiioApi = require('../device');
Expand Down Expand Up @@ -38,7 +38,7 @@ function generateKey() {
* So to work around this we activate the local developer connection and use
* that together with the regular calls for changing things on the gateway.
*/
const Gateway = Thing.type(Parent => class Gateway extends Parent.with(MiioApi, Children, EasyNameable) {
const Gateway = Thing.type(Parent => class Gateway extends Parent.with(MiioApi, Children) {
static get type() {
return 'miio:gateway';
}
Expand Down
4 changes: 2 additions & 2 deletions lib/devices/humidifier.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { EasyNameable, SwitchableMode } = require('abstract-things');
const { SwitchableMode } = require('abstract-things');
const { Humidifier, AdjustableTargetHumidity } = require('abstract-things/climate');

const MiioApi = require('../device');
Expand All @@ -15,7 +15,7 @@ const { Temperature, Humidity } = require('./capabilities/sensor');
*
*/
module.exports = class extends Humidifier
.with(EasyNameable, MiioApi, Power, SwitchableMode,
.with(MiioApi, Power, SwitchableMode,
AdjustableTargetHumidity, Temperature, Humidity,
Buzzer, LEDBrightness)
{
Expand Down
3 changes: 1 addition & 2 deletions lib/devices/philips-light-bulb.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

const { EasyNameable } = require('abstract-things');
const { LightBulb, Colorable, ColorTemperature } = require('abstract-things/lights');
const { color } = require('abstract-things/values');
const MiioApi = require('../device');
Expand All @@ -12,7 +11,7 @@ const MIN_TEMP = 3000;
const MAX_TEMP = 5700;

module.exports = class BallLamp extends LightBulb
.with(MiioApi, Power, Dimmable, EasyNameable, Colorable, ColorTemperature)
.with(MiioApi, Power, Dimmable, Colorable, ColorTemperature)
{
static get type() {
return 'miio:philiphs-ball-lamp';
Expand Down
4 changes: 2 additions & 2 deletions lib/devices/power-plug.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict';

const { Thing, EasyNameable } = require('abstract-things');
const { Thing } = require('abstract-things');
const { PowerPlug, PowerOutlet } = require('abstract-things/electrical');
const MiioApi = require('../device');
const Power = require('./capabilities/power');

module.exports = class extends Thing
.with(PowerPlug, PowerOutlet, MiioApi, Power, EasyNameable)
.with(PowerPlug, PowerOutlet, MiioApi, Power)
{
static get type() {
return 'miio:power-plug';
Expand Down
3 changes: 1 addition & 2 deletions lib/devices/power-strip.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
'use strict';

const { EasyNameable } = require('abstract-things');
const { PowerStrip } = require('abstract-things/electrical');

const MiioApi = require('../device');
const Power = require('./capabilities/power');
const Mode = require('./capabilities/mode');

module.exports = class extends PowerStrip
.with(MiioApi, Power, Mode, EasyNameable)
.with(MiioApi, Power, Mode)
{
static get type() {
return 'miio:power-strip';
Expand Down
4 changes: 2 additions & 2 deletions lib/devices/vacuum.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { EasyNameable, ChargingState, AutonomousCharging } = require('abstract-things');
const { ChargingState, AutonomousCharging } = require('abstract-things');
const {
Vacuum, AdjustableFanSpeed, AutonomousCleaning, SpotCleaning
} = require('abstract-things/climate');
Expand All @@ -19,7 +19,7 @@ function checkResult(r) {
* doesn't use properties via get_prop but instead has a get_status.
*/
module.exports = class extends Vacuum.with(
MiioApi, EasyNameable, BatteryLevel, AutonomousCharging, AutonomousCleaning,
MiioApi, BatteryLevel, AutonomousCharging, AutonomousCleaning,
SpotCleaning, AdjustableFanSpeed, ChargingState
) {
static get type() {
Expand Down

0 comments on commit 18002a7

Please sign in to comment.