mirror of
https://github.com/Xevion/go-ha.git
synced 2025-12-06 05:15:15 -06:00
fix bug with entityListeners using .Duration
This commit is contained in:
@@ -206,6 +206,7 @@ func callEntityListeners(app *App, msgBytes []byte) {
|
||||
}
|
||||
|
||||
if l.delay != 0 {
|
||||
l := l
|
||||
l.delayTimer = time.AfterFunc(l.delay, func() {
|
||||
go l.callback(app.service, app.state, entityData)
|
||||
l.lastRan = carbon.Now()
|
||||
|
||||
Reference in New Issue
Block a user