File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ export class FanAccessory extends HubspaceAccessory{
2323
2424 private configureActive ( ) : void {
2525 this . service . getCharacteristic ( this . platform . Characteristic . Active )
26- . onGet ( this . getActive . bind ( this ) ) ;
26+ . onGet ( this . getActive . bind ( this ) )
27+ . onSet ( this . setActive . bind ( this ) ) ;
2728 }
2829
2930 private configureRotationSpeed ( ) : void {
@@ -37,6 +38,10 @@ export class FanAccessory extends HubspaceAccessory{
3738 } ) ;
3839 }
3940
41+ private async setActive ( value : CharacteristicValue ) : Promise < void > {
42+ this . deviceService . setValue ( this . device . deviceId , DeviceFunction . FanPower , value ) ;
43+ }
44+
4045 private async getActive ( ) : Promise < CharacteristicValue > {
4146 // Try to get the value
4247 const value = await this . deviceService . getValue ( this . device . deviceId , DeviceFunction . FanPower ) ;
You can’t perform that action at this time.
0 commit comments