minor improvements
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user