Skip to content

Commit

Permalink
don't specify retention policy
Browse files Browse the repository at this point in the history
  • Loading branch information
Ted Pearson committed Dec 8, 2021
1 parent 56df3a7 commit d2727d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
1 change: 0 additions & 1 deletion ecobee2influx.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ influxdb:
user: user
password: password
database: ecobee
retention_policy: autogen
measurements:
thermostat: thermostat
sensor: sensor
Expand Down
15 changes: 6 additions & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,7 @@ func run(e *ecobee.Client, influx influxdb1.Client, id string, config Config, ru
sensors[len(sensors)-1] = thermSensor

points, err := influxdb1.NewBatchPoints(influxdb1.BatchPointsConfig{
Precision: "ns",
Database: config.InfluxDB.Database,
RetentionPolicy: config.InfluxDB.RetentionPolicy,
Database: config.InfluxDB.Database,
})
if err != nil {
log.Printf("Failed to make BatchPoints: %+v", errors.WithStack(err))
Expand Down Expand Up @@ -283,12 +281,11 @@ func AllOccupancy(sensors []Sensor) bool {

type Config struct {
InfluxDB struct {
Host string
User string
Password string
Database string
RetentionPolicy string `mapstructure:"retention_policy"`
Measurements struct {
Host string
User string
Password string
Database string
Measurements struct {
Thermostat string
Sensor string
}
Expand Down

0 comments on commit d2727d2

Please sign in to comment.