Пример #1
0
func (c *HeatingCoolingMode) HeatingCoolingMode() model.HeatCoolModeType {
	return model.HeatCoolModeType(c.Byte())
}
Пример #2
0
func (t *thermostat) OnTargetModeChange(fn func(model.HeatCoolModeType)) {
	t.thermostat.TargetMode.OnConnChange(func(conn net.Conn, c *characteristic.Characteristic, new, old interface{}) {
		fn(model.HeatCoolModeType(new.(byte)))
	})
}