minor improvements

This commit is contained in:
Stephan Richter
2020-12-10 20:18:31 +01:00
parent 0855a943eb
commit 49185e79a2
5 changed files with 15 additions and 6 deletions

View File

@@ -78,12 +78,16 @@ public class Contact extends Tile{
Context context = null;
if (isSet(route)) {
context = route.context();
actions.fire(context);
route.contact(this);
} else if (getClass() != Contact.class) {
plan.warn(this);
}
if (isNull(context)) context = new Context(this);
actions.fire(context);
if (isNull(context)) {
context = new Context(this);
actions.fire(context);
}
stream();
}
}

View File

@@ -174,7 +174,7 @@ public class Relay extends Tile implements Device{
public Reply state(boolean newState) {
Reply reply = init();
if (reply != null && !reply.succeeded()) return reply;
LOG.debug("Setting {} to {}",this,newState);
LOG.debug("Setting {} to {}",this,newState?1:0);
try {
String cmd = commandFor(newState);
return plan.queue(new Command(cmd) {