Skip to content

Commit 223bf18

Browse files
committed
Add sensor.lastchange
1 parent bce8b14 commit 223bf18

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/sensors/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ pub struct SensorMetadata {
4747
pub location: Option<String>,
4848
#[serde(skip_serializing_if = "Option::is_none")]
4949
pub description: Option<String>,
50+
#[serde(skip_serializing_if = "Option::is_none")]
51+
pub lastchange: Option<u64>,
5052
}
5153

5254
/// Common information describing any sensor which requires a specified location.
@@ -57,6 +59,8 @@ pub struct SensorMetadataWithLocation {
5759
pub location: String,
5860
#[serde(skip_serializing_if = "Option::is_none")]
5961
pub description: Option<String>,
62+
#[serde(skip_serializing_if = "Option::is_none")]
63+
pub lastchange: Option<u64>,
6064
}
6165

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

0 commit comments

Comments
 (0)