Skip to content

Commit 787cc57

Browse files
committed
fix: nil pointer error due to cron duration entity using wrong config
1 parent 687ce1e commit 787cc57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/switches/cron.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func NewCron(cfg CronConfig) []*entity.Entity {
4646
}
4747

4848
if cfg.Entities.Duration != nil {
49-
durationEntity = entity.NewEntity(*cfg.Entities.ExitCode).
49+
durationEntity = entity.NewEntity(*cfg.Entities.Duration).
5050
Type(entity.DomainSensor).
5151
Name(cfg.Name + " Duration").
5252
ID(cfg.UniqueID + "_duration").

0 commit comments

Comments
 (0)