aboutsummaryrefslogtreecommitdiff
path: root/inform/inform.go
diff options
context:
space:
mode:
Diffstat (limited to 'inform/inform.go')
-rw-r--r--inform/inform.go13
1 files changed, 0 insertions, 13 deletions
diff --git a/inform/inform.go b/inform/inform.go
index 59f969c..da2e095 100644
--- a/inform/inform.go
+++ b/inform/inform.go
@@ -62,19 +62,6 @@ func (i *InformWrapper) UpdatePayload(v interface{}) error {
62 } 62 }
63} 63}
64 64
65// Unmarshal a payload body that we received from a device. Does not work for
66// user-set messages
67func (i *InformWrapper) UnmarshalPayload() (*DeviceMessage, error) {
68 var m DeviceMessage
69
70 err := json.Unmarshal(i.Payload, &m)
71 if err != nil {
72 return nil, err
73 }
74
75 return &m, nil
76}
77
78// Format Mac address bytes as lowercase string with colons 65// Format Mac address bytes as lowercase string with colons
79func (i *InformWrapper) FormattedMac() string { 66func (i *InformWrapper) FormattedMac() string {
80 return fmt.Sprintf("%02x:%02x:%02x:%02x:%02x:%02x", 67 return fmt.Sprintf("%02x:%02x:%02x:%02x:%02x:%02x",