// Path: src/main/java/be/error/rpi/ebus/Support.java
// public static String addTemperatureToCommand(String command, BigDecimal temperature, int offset) {
// 	String converted = encodeDATA2c(temperature.add(new BigDecimal(offset)));
// 	return format(command, substring(converted, 2, 4), substring(converted, 0, 2));
// }
// 
// Path: src/main/java/be/error/rpi/ebus/EbusCommand.java
// public interface EbusCommand<R> {
// 
// 	String[] getEbusCommands();
// 
// 	R convertResult(List<String> results);
// 
// 	default boolean withResult() {
// 		return false;
// 	}
// }
// 
// Path: src/main/java/be/error/rpi/heating/EbusDeviceAddress.java
// public enum EbusDeviceAddress {
// 
// 	GROUND_FLOOR("30"),
// 	FIRST_FLOOR("70");
// 
// 	private final String ebusAddressPrefix;
// 
// 	EbusDeviceAddress(final String ebusAddressPrefix) {
// 		this.ebusAddressPrefix = ebusAddressPrefix;
// 	}
// 
// 	public String getEbusAddressPrefix() {
// 		return ebusAddressPrefix;
// 	}
// }


import static be.error.rpi.ebus.Support.addTemperatureToCommand;
import java.math.BigDecimal;
import java.util.List;
import be.error.rpi.ebus.EbusCommand;
import be.error.rpi.heating.EbusDeviceAddress;
/*-
 * #%L
 * Home Automation
 * %%
 * Copyright (C) 2016 - 2017 Koen Serneels
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */
package be.error.rpi.ebus.commands;




public class SetDesiredRoomTemperature implements EbusCommand<Void> {

	/**
	 * 18
	 * --
	 * 3015b509040e 2300 01 / 00
	 * 3015b509050e 2400 2001 / 00
	 * 3015b509070e 2500 86734200 / 00
	 * <p>
	 * <p>
	 * 3015b509040e230001 / 00
	 * 3015b509050e 2400 1001 / 00
	 * 3015b509070e 2500 86734200 / 00
	 */
	private final BigDecimal temperature;
	private final EbusDeviceAddress ebusDeviceAddress;

// Path: src/main/java/be/error/rpi/ebus/Support.java
// public static String addTemperatureToCommand(String command, BigDecimal temperature, int offset) {
// 	String converted = encodeDATA2c(temperature.add(new BigDecimal(offset)));
// 	return format(command, substring(converted, 2, 4), substring(converted, 0, 2));
// }
// 
// Path: src/main/java/be/error/rpi/ebus/EbusCommand.java
// public interface EbusCommand<R> {
// 
// 	String[] getEbusCommands();
// 
// 	R convertResult(List<String> results);
// 
// 	default boolean withResult() {
// 		return false;
// 	}
// }
// 
// Path: src/main/java/be/error/rpi/heating/EbusDeviceAddress.java
// public enum EbusDeviceAddress {
// 
// 	GROUND_FLOOR("30"),
// 	FIRST_FLOOR("70");
// 
// 	private final String ebusAddressPrefix;
// 
// 	EbusDeviceAddress(final String ebusAddressPrefix) {
// 		this.ebusAddressPrefix = ebusAddressPrefix;
// 	}
// 
// 	public String getEbusAddressPrefix() {
// 		return ebusAddressPrefix;
// 	}
// }


// Path: src/main/java/be/error/rpi/ebus/commands/SetDesiredRoomTemperature.java
import static be.error.rpi.ebus.Support.addTemperatureToCommand;
import java.math.BigDecimal;
import java.util.List;
import be.error.rpi.ebus.EbusCommand;
import be.error.rpi.heating.EbusDeviceAddress;

/*-
 * #%L
 * Home Automation
 * %%
 * Copyright (C) 2016 - 2017 Koen Serneels
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */
package be.error.rpi.ebus.commands;




public class SetDesiredRoomTemperature implements EbusCommand<Void> {

	/**
	 * 18
	 * --
	 * 3015b509040e 2300 01 / 00
	 * 3015b509050e 2400 2001 / 00
	 * 3015b509070e 2500 86734200 / 00
	 * <p>
	 * <p>
	 * 3015b509040e230001 / 00
	 * 3015b509050e 2400 1001 / 00
	 * 3015b509070e 2500 86734200 / 00
	 */
	private final BigDecimal temperature;
	private final EbusDeviceAddress ebusDeviceAddress;

	public SetDesiredRoomTemperature(final BigDecimal temperature, final EbusDeviceAddress ebusDeviceAddress) {