feat: grab sensor firmware version for detail sheet
This commit is contained in:
@@ -7,6 +7,7 @@ class Sensor {
|
||||
this.roomId,
|
||||
this.x,
|
||||
this.y,
|
||||
this.version,
|
||||
});
|
||||
|
||||
final int id;
|
||||
@@ -16,6 +17,7 @@ class Sensor {
|
||||
final int? roomId;
|
||||
final double? x; // room relative
|
||||
final double? y; // room relative
|
||||
final String? version;
|
||||
|
||||
bool get isPlaced => roomId != null && x != null && y != null;
|
||||
String get displayName => name ?? sensorId;
|
||||
@@ -28,6 +30,7 @@ class Sensor {
|
||||
roomId: json['room_id'] as int?,
|
||||
x: (json['x'] as num?)?.toDouble(),
|
||||
y: (json['y'] as num?)?.toDouble(),
|
||||
version: json['version'] as String?,
|
||||
);
|
||||
|
||||
Sensor copyWith({
|
||||
@@ -35,7 +38,7 @@ class Sensor {
|
||||
int? roomId,
|
||||
double? x,
|
||||
double? y,
|
||||
double? rssiRef,
|
||||
String? version,
|
||||
}) =>
|
||||
Sensor(
|
||||
id: id,
|
||||
@@ -45,5 +48,6 @@ class Sensor {
|
||||
roomId: roomId ?? this.roomId,
|
||||
x: x ?? this.x,
|
||||
y: y ?? this.y,
|
||||
version: version ?? this.version,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user