@@ -107,7 +107,7 @@ export class Zigbee2MqttDevice extends Device {
107107
108108 private createLightProperties ( expose : Expos ) : void {
109109 if ( expose . features ) {
110- ( ( this as unknown ) as { '@type' : string [ ] } ) [ '@type' ] . push ( 'Light' ) ;
110+ ( this as unknown as { '@type' : string [ ] } ) [ '@type' ] . push ( 'Light' ) ;
111111
112112 for ( const feature of expose . features ) {
113113 if ( feature . name ) {
@@ -184,7 +184,7 @@ export class Zigbee2MqttDevice extends Device {
184184
185185 private createSmartPlugProperties ( expose : Expos ) : void {
186186 if ( expose . features ) {
187- ( ( this as unknown ) as { '@type' : string [ ] } ) [ '@type' ] . push ( 'SmartPlug' ) ;
187+ ( this as unknown as { '@type' : string [ ] } ) [ '@type' ] . push ( 'SmartPlug' ) ;
188188
189189 for ( const feature of expose . features ) {
190190 if ( feature . name ) {
@@ -216,7 +216,7 @@ export class Zigbee2MqttDevice extends Device {
216216
217217 private createThermostatProperties ( expose : Expos ) : void {
218218 if ( expose . features ) {
219- ( ( this as unknown ) as { '@type' : string [ ] } ) [ '@type' ] . push ( 'Thermostat' ) ;
219+ ( this as unknown as { '@type' : string [ ] } ) [ '@type' ] . push ( 'Thermostat' ) ;
220220
221221 for ( const feature of expose . features ) {
222222 if ( feature . name ) {
@@ -304,7 +304,7 @@ export class Zigbee2MqttDevice extends Device {
304304 }
305305
306306 if ( isPushbutton ) {
307- const device = ( this as unknown ) as { '@type' : string [ ] } ;
307+ const device = this as unknown as { '@type' : string [ ] } ;
308308 device [ '@type' ] . push ( 'PushButton' ) ;
309309 }
310310 } else {
@@ -372,9 +372,7 @@ export class Zigbee2MqttDevice extends Device {
372372 continue ;
373373 }
374374
375- const exists = ( ( this as unknown ) as { events : Map < string , EventSchema > } ) . events . has (
376- value
377- ) ;
375+ const exists = ( this as unknown as { events : Map < string , EventSchema > } ) . events . has ( value ) ;
378376
379377 if ( ! exists ) {
380378 if ( debug ( ) ) {
@@ -423,7 +421,7 @@ export class Zigbee2MqttDevice extends Device {
423421 }
424422
425423 fetchValues ( ) : void {
426- const { properties } = ( this as unknown ) as {
424+ const { properties } = this as unknown as {
427425 properties : Map < string , Zigbee2MqttProperty < Any > > ;
428426 } ;
429427
0 commit comments