From 15145d1f58418e0e1f5b25a1c502b51cbf2e4045 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Sun, 18 Apr 2021 16:16:34 +0000 Subject: [PATCH] Sometimes, the last seen time is empty --- lights.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lights.go b/lights.go index 21a9d48..7498fed 100644 --- a/lights.go +++ b/lights.go @@ -40,19 +40,19 @@ type ( } Light struct { - Id string `json:"id"` - UUID string `json:"uuid"` - Label string `json:"label"` - Connected bool `json:"connected"` - Power string `json:"power"` - Color HSBKColor `json:"color"` - Brightness float64 `json:"brightness"` - Effect string `json:"effect"` - Group Selector `json:"group"` - Location Selector `json:"location"` - Product Product `json:"product"` - LastSeen time.Time `json:"last_seen"` - SecondsLastSeen float64 `json:"seconds_last_seen"` + Id string `json:"id"` + UUID string `json:"uuid"` + Label string `json:"label"` + Connected bool `json:"connected"` + Power string `json:"power"` + Color HSBKColor `json:"color"` + Brightness float64 `json:"brightness"` + Effect string `json:"effect"` + Group Selector `json:"group"` + Location Selector `json:"location"` + Product Product `json:"product"` + LastSeen *time.Time `json:"last_seen,omitempty"` + SecondsLastSeen float64 `json:"seconds_last_seen"` } State struct {