Skip to content

Commit

Permalink
Fix introduced bug that didn't report false occupancy
Browse files Browse the repository at this point in the history
  • Loading branch information
tedpearson committed Mar 3, 2024
1 parent 6224bc5 commit e498aed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,12 @@ func run(e *ecobee.Client, writeApi api.WriteAPIBlocking, config Config) {
}
}
if c.Type == "occupancy" {
occ := false
if c.Value == "true" {
occ = true
allOccupancy = true
point.AddField("occupancy", true)
}
point.AddField("occupancy", occ)
}
if c.Type == "humidity" {
hum, err := strconv.ParseFloat(c.Value, 64)
Expand Down

0 comments on commit e498aed

Please sign in to comment.