@@ -20,15 +20,15 @@ class SensorData {
2020 readonly status_progress : number ;
2121
2222 constructor ( data : Record < string , any > = { } ) {
23- this . raw = data . raw ?? 0 ;
24- this . voltage = data . voltage ?? 0 ;
25- this . moisture = data . moisture ?? 0 ;
26- this . prev_status = data . prev_status ?? "" ;
27- this . curr_status = data . curr_status ?? "" ;
28- this . prev_status_dur = data . prev_status_dur ?? 0 ;
29- this . curr_status_dur = data . curr_status_dur ?? 0 ;
30- this . write_count = data . write_count ?? 0 ;
31- this . status_progress = data . status_progress ?? 0 ;
23+ this . raw = data [ " raw" ] ?? 0 ;
24+ this . voltage = data [ " voltage" ] ?? 0 ;
25+ this . moisture = data [ " moisture" ] ?? 0 ;
26+ this . prev_status = data [ " prev_status" ] ?? "" ;
27+ this . curr_status = data [ " curr_status" ] ?? "" ;
28+ this . prev_status_dur = data [ " prev_status_dur" ] ?? 0 ;
29+ this . curr_status_dur = data [ " curr_status_dur" ] ?? 0 ;
30+ this . write_count = data [ " write_count" ] ?? 0 ;
31+ this . status_progress = data [ " status_progress" ] ?? 0 ;
3232 }
3333}
3434
@@ -84,7 +84,7 @@ export class AnalogSensorComponent extends Component<
8484 } ;
8585 }
8686
87- async componentDidMount ( ) {
87+ override async componentDidMount ( ) {
8888 const error = this . props . store . add ( this ) ;
8989 if ( error ) {
9090 console . error (
@@ -93,7 +93,7 @@ export class AnalogSensorComponent extends Component<
9393 }
9494 }
9595
96- componentWillUnmount ( ) {
96+ override componentWillUnmount ( ) {
9797 const error = this . props . store . remove ( this ) ;
9898 if ( error ) {
9999 console . error (
0 commit comments