From e619e174ed1c1230a241c70f8b8722deed6d41db Mon Sep 17 00:00:00 2001 From: andig Date: Mon, 16 Nov 2020 17:59:10 +0100 Subject: [PATCH] Simplify #445 --- push/hub.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/push/hub.go b/push/hub.go index 887204c65..fd9557c22 100644 --- a/push/hub.go +++ b/push/hub.go @@ -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 {