Skip to content

Commit

Permalink
#4 Fix for inverted logic
Browse files Browse the repository at this point in the history
  • Loading branch information
magx2 committed Apr 10, 2019
1 parent 080afae commit a3478ad
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public Optional<State> onDefault(Channel channel) {
}

private Optional<State> hiType(Channel channel) {
boolean invertedLogic = channel.getParam3() != null && channel.getParam3() > 1;
boolean invertedLogic = channel.getParam3() != null && channel.getParam3() > 0;
return of(channel)
.map(Channel::getState)
.map(ChannelState::getHi)
Expand All @@ -223,7 +223,7 @@ private Optional<State> hiType(Channel channel) {
* https://github.com/SUPLA/supla-cloud/wiki/Channel-Functions-states
*/
private Optional<State> optionalHiType(Channel channel) {
boolean invertedLogic = channel.getParam3() != null && channel.getParam3() > 1;
boolean invertedLogic = channel.getParam3() != null && channel.getParam3() > 0;
boolean param2Present = channel.getParam2() != null && channel.getParam2() > 0;
if (param2Present || !channel.getType().isOutput()) {
return of(channel)
Expand Down

0 comments on commit a3478ad

Please sign in to comment.