package goha /* // Policy is added to light struct // On state change, get all policies and check them func (l *Light) SetPolicy(policy func() bool, action func() error) error { return nil } bedLight := Entities["light.bed_light"].(*Light) sensor := Entities["binary_sensor.movement_backyard"].(*BinarySensor) bedLight.SetPolicy(func() bool { return sensor.Triggered() }, func() error { bedLight.On() return nil }) */