@@ -56,12 +56,12 @@ export class DiscoveryService{
5656 }
5757 }
5858
59- this . clearStaleAccessories ( this . _cachedAccessories . filter ( a => ! devices . some ( d => d . uuid === a . UUID ) ) )
59+ this . clearStaleAccessories ( this . _cachedAccessories . filter ( a => ! devices . some ( d => d . uuid === a . UUID ) ) ) ;
6060 }
6161
6262 private clearStaleAccessories ( staleAccessories : PlatformAccessory [ ] ) : void {
6363 // Unregister them
64- this . _platform . api . unregisterPlatformAccessories ( PLUGIN_NAME , PLATFORM_NAME , staleAccessories )
64+ this . _platform . api . unregisterPlatformAccessories ( PLUGIN_NAME , PLATFORM_NAME , staleAccessories ) ;
6565
6666 // Clear the cache array to reflect this change
6767 for ( const accessory of staleAccessories ) {
@@ -89,12 +89,13 @@ export class DiscoveryService{
8989
9090 private async getDevicesForAccount ( ) : Promise < Device [ ] > {
9191 try {
92- const response = await this . _httpClient . get < DeviceResponse [ ] > ( `accounts/${ this . _platform . accountService . accountId } /metadevices` ) ;
92+ const response =
93+ await this . _httpClient . get < DeviceResponse [ ] > ( `accounts/${ this . _platform . accountService . accountId } /metadevices` ) ;
9394 // Get only leaf devices with type of 'device'
9495 return response . data
95- . filter ( d => d . children . length === 0 && d . typeId === 'metadevice.device' )
96- . map ( this . mapDeviceResponseToModel . bind ( this ) )
97- . filter ( d => d !== undefined ) as Device [ ] ;
96+ . filter ( d => d . children . length === 0 && d . typeId === 'metadevice.device' )
97+ . map ( this . mapDeviceResponseToModel . bind ( this ) )
98+ . filter ( d => d !== undefined ) as Device [ ] ;
9899 } catch ( ex ) {
99100 this . _platform . log . error ( 'Failed to get devices for account.' , ( < AxiosError > ex ) . message ) ;
100101 return [ ] ;
0 commit comments