forked from openhab/openhab1-addons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openhab#2162 from frami/master
[Novelan] Support for changing operation mode of novelanheatpump
- Loading branch information
Showing
6 changed files
with
266 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...elanheatpump/src/main/java/org/openhab/binding/novelanheatpump/HeatpumpOperationMode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* Copyright (c) 2010-2015, openHAB.org and others. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.openhab.binding.novelanheatpump; | ||
|
||
public enum HeatpumpOperationMode { | ||
// in german Automatik | ||
AUTOMATIC(0), | ||
// in german Aus | ||
OFF(4), | ||
// in german Party | ||
PARTY(2), | ||
// in german Urlaub | ||
HOLIDAY(3), | ||
// in german Zuzeizer | ||
AUXILIARY_HEATER(1); | ||
|
||
private int value; | ||
|
||
private HeatpumpOperationMode(int value){ | ||
this.value = value; | ||
} | ||
|
||
public int getValue(){ | ||
return value; | ||
} | ||
|
||
public static HeatpumpOperationMode fromValue(int value){ | ||
for(HeatpumpOperationMode mode : HeatpumpOperationMode.values()){ | ||
if(mode.value == value){ | ||
return mode; | ||
} | ||
} | ||
return null; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters