Skip to content

Commit cd08484

Browse files
koarlchenrnestler
authored andcommitted
Add sensor.lastchange
1 parent 88f3a36 commit cd08484

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/sensors/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ pub struct SensorMetadata {
4949
pub location: Option<String>,
5050
#[serde(skip_serializing_if = "Option::is_none")]
5151
pub description: Option<String>,
52+
#[serde(skip_serializing_if = "Option::is_none")]
53+
pub lastchange: Option<u64>,
5254
}
5355

5456
/// Common information describing any sensor which requires a specified location.
@@ -59,6 +61,8 @@ pub struct SensorMetadataWithLocation {
5961
pub location: String,
6062
#[serde(skip_serializing_if = "Option::is_none")]
6163
pub description: Option<String>,
64+
#[serde(skip_serializing_if = "Option::is_none")]
65+
pub lastchange: Option<u64>,
6266
}
6367

6468
/// Describes an error occurring when building a sensor from a `SensorTemplate`.

0 commit comments

Comments
 (0)