Skip to content

Commit

Permalink
fix go.mod, fix soil* fields, and other types that were wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
lrosenman committed Aug 28, 2022
1 parent 7efa004 commit 7763394
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 25 deletions.
51 changes: 27 additions & 24 deletions ambient.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

// Package ambient provides helper functions and Go types
// for accessing ambientweather.net's API which is documented at
// https://ambientweather.docs.apiary.io/
//
// https://ambientweather.docs.apiary.io/
package ambient

import (
Expand Down Expand Up @@ -90,8 +91,8 @@ type Record struct {
Lightning_day int
Lightning_distance float64
Lightning_hour int
Lightning_time int
Pm25 int
Lightning_time time.Time
Pm25 float64
Pm25_24h float64
Relay1 int
Relay2 int
Expand All @@ -104,26 +105,26 @@ type Record struct {
Relay9 int
Relay10 int
Monthlyrainin float64
soiltemp1f float64
soiltemp2f float64
soiltemp3f float64
soiltemp4f float64
soiltemp5f float64
soiltemp6f float64
soiltemp7f float64
soiltemp8f float64
soiltemp9f float64
soiltemp10f float64
soilhum1 float64
soilhum2 float64
soilhum3 float64
soilhum4 float64
soilhum5 float64
soilhum6 float64
soilhum7 float64
soilhum8 float64
soilhum9 float64
soilhum10 float64
Soiltemp1f float64
Soiltemp2f float64
Soiltemp3f float64
Soiltemp4f float64
Soiltemp5f float64
Soiltemp6f float64
Soiltemp7f float64
Soiltemp8f float64
Soiltemp9f float64
Soiltemp10f float64
Soilhum1 float64
Soilhum2 float64
Soilhum3 float64
Soilhum4 float64
Soilhum5 float64
Soilhum6 float64
Soilhum7 float64
Soilhum8 float64
Soilhum9 float64
Soilhum10 float64
Solarradiation float64
Tempf float64
Temp1f float64
Expand Down Expand Up @@ -156,6 +157,8 @@ type Record struct {
Windspdmph_avg10m float64
Yearlyrainin float64
TZ string
Aqi_pm25_in int
Aqi_pm25_in_24h int
}

// DeviceInfo maps the info portion of the /devices API.
Expand All @@ -164,7 +167,7 @@ type DeviceInfo struct {
Location string
}

//DeviceRecord maps one record of the /devices API.
// DeviceRecord maps one record of the /devices API.
type DeviceRecord struct {
Macaddress string
Info DeviceInfo
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/lrosenman/ambient

go 1.18.3
go 1.18

0 comments on commit 7763394

Please sign in to comment.