This commit is contained in:
andig 2020-11-16 17:59:10 +01:00
parent 0538a36acf
commit e619e174ed

View file

@ -1,6 +1,8 @@
package push
import (
"time"
"github.com/andig/evcc/util"
)
@ -35,6 +37,9 @@ func (h *Hub) Add(sender Sender) {
func (h *Hub) apply(ev Event, template string) (string, error) {
attr := make(map[string]interface{})
// let cache catch up, refs reverted https://github.com/andig/evcc/pull/445
time.Sleep(100 * time.Millisecond)
// get all values from cache
for _, p := range h.cache.All() {
if p.LoadPoint == nil || ev.LoadPoint == p.LoadPoint {