[haywardomnilogic] Update unit formating (#10781)
* Update unit formating Signed-off-by: Matt Myers <mmyers75@icloud.com> * Updates per last review Signed-off-by: Matt Myers <mmyers75@icloud.com> * Updated units to decimal Signed-off-by: Matt Myers <mmyers75@icloud.com>
This commit is contained in:
parent
cb256f6676
commit
40c7f41eb5
@ -101,7 +101,7 @@ public class HaywardBackyardHandler extends HaywardThingHandler {
|
||||
.evaluateXPath("/Response/Parameters//Parameter[@name='Status']/text()", xmlResponse)
|
||||
.get(0);
|
||||
|
||||
if (!(status.equals("0"))) {
|
||||
if (!("0".equals(status))) {
|
||||
logger.trace("Hayward getAlarm XML response: {}", xmlResponse);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -186,7 +186,7 @@ public class HaywardBridgeHandler extends BaseBridgeHandler {
|
||||
|
||||
status = evaluateXPath("/Response/Parameters//Parameter[@name='Status']/text()", xmlResponse).get(0);
|
||||
|
||||
if (!(status.equals("0"))) {
|
||||
if (!("0".equals(status))) {
|
||||
logger.debug("Hayward Connection thing: Login XML response: {}", xmlResponse);
|
||||
return false;
|
||||
}
|
||||
@ -234,7 +234,7 @@ public class HaywardBridgeHandler extends BaseBridgeHandler {
|
||||
|
||||
status = evaluateXPath("/Response/Parameters//Parameter[@name='Status']/text()", xmlResponse).get(0);
|
||||
|
||||
if (!(status.equals("0"))) {
|
||||
if (!("0".equals(status))) {
|
||||
logger.debug("Hayward Connection thing: getSiteList XML response: {}", xmlResponse);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ public class HaywardChlorinatorHandler extends HaywardThingHandler {
|
||||
try {
|
||||
switch (channelUID.getId()) {
|
||||
case HaywardBindingConstants.CHANNEL_CHLORINATOR_ENABLE:
|
||||
if (cmdString.equals("1")) {
|
||||
if ("1".equals(cmdString)) {
|
||||
chlorCfgState = "3";
|
||||
chlorTimedPercent = this.chlorTimedPercent;
|
||||
} else {
|
||||
@ -168,7 +168,7 @@ public class HaywardChlorinatorHandler extends HaywardThingHandler {
|
||||
String status = bridgehandler.evaluateXPath("//Parameter[@name='Status']/text()", xmlResponse)
|
||||
.get(0);
|
||||
|
||||
if (!(status.equals("0"))) {
|
||||
if (!("0".equals(status))) {
|
||||
logger.debug("haywardCommand XML response: {}", xmlResponse);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ public class HaywardColorLogicHandler extends HaywardThingHandler {
|
||||
String status = bridgehandler.evaluateXPath("//Parameter[@name='Status']/text()", xmlResponse)
|
||||
.get(0);
|
||||
|
||||
if (!(status.equals("0"))) {
|
||||
if (!("0".equals(status))) {
|
||||
logger.debug("haywardCommand XML response: {}", xmlResponse);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ public class HaywardFilterHandler extends HaywardThingHandler {
|
||||
String status = bridgehandler.evaluateXPath("//Parameter[@name='Status']/text()", xmlResponse)
|
||||
.get(0);
|
||||
|
||||
if (!(status.equals("0"))) {
|
||||
if (!("0".equals(status))) {
|
||||
logger.debug("haywardCommand XML response: {}", xmlResponse);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ public class HaywardRelayHandler extends HaywardThingHandler {
|
||||
String status = bridgehandler.evaluateXPath("//Parameter[@name='Status']/text()", xmlResponse)
|
||||
.get(0);
|
||||
|
||||
if (!(status.equals("0"))) {
|
||||
if (!("0".equals(status))) {
|
||||
logger.debug("haywardCommand XML response: {}", xmlResponse);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ public class HaywardVirtualHeaterHandler extends HaywardThingHandler {
|
||||
String status = bridgehandler.evaluateXPath("//Parameter[@name='Status']/text()", xmlResponse)
|
||||
.get(0);
|
||||
|
||||
if (!(status.equals("0"))) {
|
||||
if (!("0".equals(status))) {
|
||||
logger.debug("haywardCommand XML response: {}", xmlResponse);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
<item-type>Number:Temperature</item-type>
|
||||
<label>Air Temp</label>
|
||||
<description>Air Temp</description>
|
||||
<state pattern="%1f %unit%" readOnly="true"/>
|
||||
<state pattern="%d %unit%" readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="backyardstatus">
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
<item-type>Number:Temperature</item-type>
|
||||
<label>Water Temp</label>
|
||||
<description>Water Temp</description>
|
||||
<state pattern="%1f %unit%" readOnly="true"/>
|
||||
<state pattern="%d %unit%" readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
</thing:thing-descriptions>
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
<item-type>Number:Dimensionless</item-type>
|
||||
<label>Salt Output (%)</label>
|
||||
<description>Current salt output setting for the chlorinator (%).</description>
|
||||
<state min="0" max="100" step="1.0" pattern="%1f %unit%" readOnly="false"/>
|
||||
<state min="0" max="100" step="1.0" pattern="%d %unit%" readOnly="false"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="scMode">
|
||||
@ -84,20 +84,20 @@
|
||||
<item-type>Number:Dimensionless</item-type>
|
||||
<label>Average Salt Level</label>
|
||||
<description>Average Salt Level</description>
|
||||
<state pattern="%1f %unit%" readOnly="true"/>
|
||||
<state pattern="%d %unit%" readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="instantSaltLevel">
|
||||
<item-type>Number:Dimensionless</item-type>
|
||||
<label>Instant Salt Level</label>
|
||||
<description>Instant Salt Level</description>
|
||||
<state pattern="%1f %unit%" readOnly="true"/>
|
||||
<state pattern="%d %unit%" readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="status">
|
||||
<item-type>Number</item-type>
|
||||
<label>Status</label>
|
||||
<description>Status</description>
|
||||
<state pattern="%1f" readOnly="true"/>
|
||||
<state pattern="%d" readOnly="true"/>
|
||||
</channel-type>
|
||||
</thing:thing-descriptions>
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
<item-type>Number:Dimensionless</item-type>
|
||||
<label>Filter Speed</label>
|
||||
<description>Filter Speed in %</description>
|
||||
<state min="0" max="100" step="1.0" pattern="%1f %unit%" readOnly="false"/>
|
||||
<state min="0" max="100" step="1.0" pattern="%d %unit%" readOnly="false"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="filterState">
|
||||
@ -77,7 +77,7 @@
|
||||
<item-type>Number:Dimensionless</item-type>
|
||||
<label>Last Speed</label>
|
||||
<description>Last Speed</description>
|
||||
<state pattern="%1f %unit%" readOnly="true"/>
|
||||
<state pattern="%d %unit%" readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
</thing:thing-descriptions>
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
<item-type>Number:Dimensionless</item-type>
|
||||
<label>Pump Speed in %</label>
|
||||
<description>Pump Speed</description>
|
||||
<state min="0" max="100" step="1.0" pattern="%1f %unit%" readOnly="false"/>
|
||||
<state min="0" max="100" step="1.0" pattern="%d %unit%" readOnly="false"/>
|
||||
</channel-type>
|
||||
|
||||
</thing:thing-descriptions>
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
<label>Current Setpoint</label>
|
||||
<description>Current Setpoint</description>
|
||||
<category>Temperature</category>
|
||||
<state min="65" max="90" step="1.0" pattern="%1f %unit%" readOnly="false"/>
|
||||
<state min="65" max="90" step="1.0" pattern="%d %unit%" readOnly="false"/>
|
||||
</channel-type>
|
||||
|
||||
</thing:thing-descriptions>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user