evcc-io/util/param.go
andig e34167ce7d
Implement multiple loadpoints and new UI (#199)
* Support multiple loadpoints

* Finalize loadpoint site split

* Simplify global voltage

* Fix push template error stopping main process

* Show only last error on retry

* Improve influx v1 compatibility

* Update push templates

* Revert influx v1 user change
2020-07-16 09:34:58 +02:00

19 lines
372 B
Go

package util
import "strconv"
// Param is the broadcast channel data type
type Param struct {
LoadPoint *int
Key string
Val interface{}
}
// UniqueID returns unique identifier for parameter LoadPoint/Key combination
func (p Param) UniqueID() string {
key := p.Key
if p.LoadPoint != nil {
key = strconv.Itoa(*p.LoadPoint) + "." + key
}
return key
}