This repository has been archived by the owner on May 7, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[homematic] UoM support unexpected units (#6690)
* [homematic] UoM support unexpected units * add support for "100%" and "À°C" which may be present in datapoints * remove UoM for time (since hardly anybody will want to convert on those items) * Extend unittests and improve logging Not sure if it will fix #6612 but at least it will improve logging Signed-off-by: Michael Reitler <michael.reitler@telekom.de>
- Loading branch information
1 parent
002d56f
commit b57bbb1
Showing
8 changed files
with
166 additions
and
83 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...st/java/org/eclipse/smarthome/binding/homematic/internal/converter/BaseConverterTest.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,29 @@ | ||
package org.eclipse.smarthome.binding.homematic.internal.converter; | ||
|
||
import org.eclipse.smarthome.binding.homematic.internal.model.HmChannel; | ||
import org.eclipse.smarthome.binding.homematic.internal.model.HmDatapoint; | ||
import org.eclipse.smarthome.binding.homematic.internal.model.HmDevice; | ||
import org.eclipse.smarthome.binding.homematic.internal.model.HmInterface; | ||
import org.eclipse.smarthome.binding.homematic.internal.model.HmParamsetType; | ||
import org.eclipse.smarthome.binding.homematic.internal.model.HmValueType; | ||
import org.junit.Before; | ||
|
||
public class BaseConverterTest { | ||
|
||
protected final HmDatapoint floatDp = new HmDatapoint("floatDp", "", HmValueType.FLOAT, null, false, | ||
HmParamsetType.VALUES); | ||
protected final HmDatapoint integerDp = new HmDatapoint("integerDp", "", HmValueType.INTEGER, null, false, | ||
HmParamsetType.VALUES); | ||
protected final HmDatapoint floatQuantityDp = new HmDatapoint("floatQuantityDp", "", HmValueType.FLOAT, null, false, | ||
HmParamsetType.VALUES); | ||
protected final HmDatapoint integerQuantityDp = new HmDatapoint("floatIntegerDp", "", HmValueType.INTEGER, null, | ||
false, HmParamsetType.VALUES); | ||
|
||
@Before | ||
public void setup() { | ||
HmChannel stubChannel = new HmChannel("stubChannel", 0); | ||
stubChannel.setDevice(new HmDevice("LEQ123456", HmInterface.RF, "HM-STUB-DEVICE", "", "", "")); | ||
floatDp.setChannel(stubChannel); | ||
} | ||
|
||
} |
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
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
Oops, something went wrong.