func (s *DoorState) DoorState() model.DoorStateType { return model.DoorStateType(s.Byte()) }
func (o *garageDoorOpener) OnTargetStateChange(fn func(model.DoorStateType)) { o.garageDoorOpener.TargetState.OnConnChange(func(conn net.Conn, c *characteristic.Characteristic, new, old interface{}) { fn(model.DoorStateType(new.(byte))) }) }