Simplify #445
This commit is contained in:
parent
0538a36acf
commit
e619e174ed
1 changed files with 5 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue