Skip to content

Commit

Permalink
Imlemented temporary workaround for #222
Browse files Browse the repository at this point in the history
  • Loading branch information
climategadgets committed Nov 27, 2021
1 parent f26367b commit b8de6c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ private HvacCommand reconcile(HvacCommand command) {
}

if (mode != HvacMode.COOLING && command.fanSpeed != null && command.fanSpeed > 0) {
throw new IllegalArgumentException("fanSpeed=" + command.fanSpeed + " is not supported by this instance (not in cooling mode)");
// FIXME: https://github.com/home-climate-control/dz/issues/222
// throw new IllegalArgumentException("fanSpeed=" + command.fanSpeed + " is not supported by this instance (not in cooling mode)");
logger.warn("fanSpeed=>0 should not be issued to this device in heating mode, kick the maintainer to fix #222 (command={})", command);
}

var result = new HvacCommand(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.sf.dz3r.signal.Signal;
import net.sf.dz3r.signal.hvac.HvacCommand;
import net.sf.dz3r.signal.hvac.HvacDeviceStatus;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import reactor.core.publisher.Flux;
import reactor.test.StepVerifier;
Expand Down Expand Up @@ -107,6 +108,7 @@ void wrongMode() {
* Make sure that the fan function is not allowed for heat-only devices.
*/
@Test
@Disabled("until #222 is fixed")
void noFansForHeating() {

var d = new SwitchableHvacDevice("d", HvacMode.HEATING, mock(Switch.class));
Expand Down

0 comments on commit b8de6c4

Please sign in to comment.