Example #1
0
func (s *LockState) LockState() model.LockStateType {
	return model.LockStateType(s.Byte())
}
Example #2
0
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)))
	})
}