mirror of
https://github.com/Xevion/go-ha.git
synced 2025-12-09 18:07:15 -06:00
add etl.RunOnStartup
This commit is contained in:
@@ -24,9 +24,10 @@ type EntityListener struct {
|
||||
|
||||
exceptionDays []time.Time
|
||||
exceptionRanges []timeRange
|
||||
}
|
||||
|
||||
// TODO: add RunOnStartup() to etl, evl, schedule
|
||||
runOnStartup bool
|
||||
runOnStartupCompleted bool
|
||||
}
|
||||
|
||||
type EntityListenerCallback func(*Service, *State, EntityData)
|
||||
|
||||
@@ -142,6 +143,11 @@ func (b elBuilder3) ExceptionRange(start, end time.Time) elBuilder3 {
|
||||
return b
|
||||
}
|
||||
|
||||
func (b elBuilder3) RunOnStartup() elBuilder3 {
|
||||
b.entityListener.runOnStartup = true
|
||||
return b
|
||||
}
|
||||
|
||||
func (b elBuilder3) Build() EntityListener {
|
||||
return b.entityListener
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user