overhauled actions

This commit is contained in:
Stephan Richter
2020-11-20 00:03:58 +01:00
parent c21d0fbb8b
commit e7a6349c7c
16 changed files with 29 additions and 53 deletions

View File

@@ -204,7 +204,7 @@ public class Contact extends Tile{
return trigger;
}
public boolean trigger(int duration) throws IOException {
public boolean trigger(int duration) {
activate(true);
new Thread() {
public void run() {

View File

@@ -171,7 +171,7 @@ public class Relay extends Tile implements Device{
return state;
}
public Reply state(boolean newState) throws IOException {
public Reply state(boolean newState) {
Reply reply = init();
if (reply != null && !reply.succeeded()) return reply;
LOG.debug("Setting {} to {}",this,newState);
@@ -196,9 +196,7 @@ public class Relay extends Tile implements Device{
} catch (TimeoutException e) {
LOG.warn(e.getMessage());
}
return new Reply(417,t("Timeout while trying to switch {}.",this));
return new Reply(417,t("Timeout while trying to switch {}.",this));
}
public void success() {