Skip to content

Commit

Permalink
Add optional field sensor.lastchange
Browse files Browse the repository at this point in the history
  • Loading branch information
koarlchen committed Jan 5, 2025
1 parent 4bf3fbc commit 935d709
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ keywords = ["spaceapi", "hackspace", "k4cg"]
[dependencies]
# As of now, the spaceapi crate does not support the v15 schema.
# Therefore we use a fork, where the required changes were already implemented.
spaceapi = { git = "https://github.com/koarlchen/spaceapi-rs", branch = "co2-v15" }
spaceapi = { git = "https://github.com/koarlchen/spaceapi-rs", branch = "v15" }
influxdb = "0.7.2"
serde = "1.0.217"
serde_json = "1.0.134"
Expand Down
1 change: 1 addition & 0 deletions src/server/routes/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ where
unit: cfg.unit.clone(),
metadata: sensors::SensorMetadataWithLocation {
location: sensor.location.clone(),
lastchange: Some(value.time.timestamp() as u64),
..Default::default()
},
}
Expand Down

0 comments on commit 935d709

Please sign in to comment.