fix runonstartup bug

This commit is contained in:
Sam Lewis
2022-11-09 21:03:57 -05:00
parent e9f07b9b32
commit 0f970c2732

3
app.go
View File

@@ -197,7 +197,8 @@ func (a *App) Start() {
if err != nil {
log.Default().Println("Failed to get entity state \"", eid, "\" during startup, skipping RunOnStartup")
}
etl.callback(a.service, a.state, EntityData{
etl.runOnStartupCompleted = true
go etl.callback(a.service, a.state, EntityData{
TriggerEntityId: eid,
FromState: entityState.State,
FromAttributes: entityState.Attributes,