Trying to save some events

This commit is contained in:
lda
2026-04-30 13:59:18 +07:00 Verified
parent 2b98662bcc
commit b20f53c6ba
11 changed files with 377 additions and 192 deletions
+3 -1
View File
@@ -174,7 +174,9 @@ impl Device {
fn observation_presence(observation: &DeviceObservationFact) -> Presence {
match (observation.kind.as_str(), observation.action.as_str()) {
(_, "remove") => Presence::Offline,
(_, "remove" | "failed") => Presence::Offline,
(_, "permanent" | "reachable") => Presence::Online,
(_, "stale") => Presence::LikelyOnline,
("neigh", "add" | "update" | "old") => Presence::LikelyOnline,
_ => Presence::Unknown,
}