func (s *LockState) LockState() model.LockStateType { return model.LockStateType(s.Byte()) }
func (o *garageDoorOpener) OnLockTargetStateChange(fn func(model.LockStateType)) { o.garageDoorOpener.LockTargetState.OnConnChange(func(conn net.Conn, c *characteristic.Characteristic, new, old interface{}) { fn(model.LockStateType(new.(byte))) }) }