[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)
|
.evaluateXPath("/Response/Parameters//Parameter[@name='Status']/text()", xmlResponse)
|
||||||
.get(0);
|
.get(0);
|
||||||
|
|
||||||
if (!(status.equals("0"))) {
|
if (!("0".equals(status))) {
|
||||||
logger.trace("Hayward getAlarm XML response: {}", xmlResponse);
|
logger.trace("Hayward getAlarm XML response: {}", xmlResponse);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -186,7 +186,7 @@ public class HaywardBridgeHandler extends BaseBridgeHandler {
|
|||||||
|
|
||||||
status = evaluateXPath("/Response/Parameters//Parameter[@name='Status']/text()", xmlResponse).get(0);
|
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);
|
logger.debug("Hayward Connection thing: Login XML response: {}", xmlResponse);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -234,7 +234,7 @@ public class HaywardBridgeHandler extends BaseBridgeHandler {
|
|||||||
|
|
||||||
status = evaluateXPath("/Response/Parameters//Parameter[@name='Status']/text()", xmlResponse).get(0);
|
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);
|
logger.debug("Hayward Connection thing: getSiteList XML response: {}", xmlResponse);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -128,7 +128,7 @@ public class HaywardChlorinatorHandler extends HaywardThingHandler {
|
|||||||
try {
|
try {
|
||||||
switch (channelUID.getId()) {
|
switch (channelUID.getId()) {
|
||||||
case HaywardBindingConstants.CHANNEL_CHLORINATOR_ENABLE:
|
case HaywardBindingConstants.CHANNEL_CHLORINATOR_ENABLE:
|
||||||
if (cmdString.equals("1")) {
|
if ("1".equals(cmdString)) {
|
||||||
chlorCfgState = "3";
|
chlorCfgState = "3";
|
||||||
chlorTimedPercent = this.chlorTimedPercent;
|
chlorTimedPercent = this.chlorTimedPercent;
|
||||||
} else {
|
} else {
|
||||||
@ -168,7 +168,7 @@ public class HaywardChlorinatorHandler extends HaywardThingHandler {
|
|||||||
String status = bridgehandler.evaluateXPath("//Parameter[@name='Status']/text()", xmlResponse)
|
String status = bridgehandler.evaluateXPath("//Parameter[@name='Status']/text()", xmlResponse)
|
||||||
.get(0);
|
.get(0);
|
||||||
|
|
||||||
if (!(status.equals("0"))) {
|
if (!("0".equals(status))) {
|
||||||
logger.debug("haywardCommand XML response: {}", xmlResponse);
|
logger.debug("haywardCommand XML response: {}", xmlResponse);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -135,7 +135,7 @@ public class HaywardColorLogicHandler extends HaywardThingHandler {
|
|||||||
String status = bridgehandler.evaluateXPath("//Parameter[@name='Status']/text()", xmlResponse)
|
String status = bridgehandler.evaluateXPath("//Parameter[@name='Status']/text()", xmlResponse)
|
||||||
.get(0);
|
.get(0);
|
||||||
|
|
||||||
if (!(status.equals("0"))) {
|
if (!("0".equals(status))) {
|
||||||
logger.debug("haywardCommand XML response: {}", xmlResponse);
|
logger.debug("haywardCommand XML response: {}", xmlResponse);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -140,7 +140,7 @@ public class HaywardFilterHandler extends HaywardThingHandler {
|
|||||||
String status = bridgehandler.evaluateXPath("//Parameter[@name='Status']/text()", xmlResponse)
|
String status = bridgehandler.evaluateXPath("//Parameter[@name='Status']/text()", xmlResponse)
|
||||||
.get(0);
|
.get(0);
|
||||||
|
|
||||||
if (!(status.equals("0"))) {
|
if (!("0".equals(status))) {
|
||||||
logger.debug("haywardCommand XML response: {}", xmlResponse);
|
logger.debug("haywardCommand XML response: {}", xmlResponse);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -104,7 +104,7 @@ public class HaywardRelayHandler extends HaywardThingHandler {
|
|||||||
String status = bridgehandler.evaluateXPath("//Parameter[@name='Status']/text()", xmlResponse)
|
String status = bridgehandler.evaluateXPath("//Parameter[@name='Status']/text()", xmlResponse)
|
||||||
.get(0);
|
.get(0);
|
||||||
|
|
||||||
if (!(status.equals("0"))) {
|
if (!("0".equals(status))) {
|
||||||
logger.debug("haywardCommand XML response: {}", xmlResponse);
|
logger.debug("haywardCommand XML response: {}", xmlResponse);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -131,7 +131,7 @@ public class HaywardVirtualHeaterHandler extends HaywardThingHandler {
|
|||||||
String status = bridgehandler.evaluateXPath("//Parameter[@name='Status']/text()", xmlResponse)
|
String status = bridgehandler.evaluateXPath("//Parameter[@name='Status']/text()", xmlResponse)
|
||||||
.get(0);
|
.get(0);
|
||||||
|
|
||||||
if (!(status.equals("0"))) {
|
if (!("0".equals(status))) {
|
||||||
logger.debug("haywardCommand XML response: {}", xmlResponse);
|
logger.debug("haywardCommand XML response: {}", xmlResponse);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
<item-type>Number:Temperature</item-type>
|
<item-type>Number:Temperature</item-type>
|
||||||
<label>Air Temp</label>
|
<label>Air Temp</label>
|
||||||
<description>Air Temp</description>
|
<description>Air Temp</description>
|
||||||
<state pattern="%1f %unit%" readOnly="true"/>
|
<state pattern="%d %unit%" readOnly="true"/>
|
||||||
</channel-type>
|
</channel-type>
|
||||||
|
|
||||||
<channel-type id="backyardstatus">
|
<channel-type id="backyardstatus">
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
<item-type>Number:Temperature</item-type>
|
<item-type>Number:Temperature</item-type>
|
||||||
<label>Water Temp</label>
|
<label>Water Temp</label>
|
||||||
<description>Water Temp</description>
|
<description>Water Temp</description>
|
||||||
<state pattern="%1f %unit%" readOnly="true"/>
|
<state pattern="%d %unit%" readOnly="true"/>
|
||||||
</channel-type>
|
</channel-type>
|
||||||
|
|
||||||
</thing:thing-descriptions>
|
</thing:thing-descriptions>
|
||||||
|
|||||||
@ -47,7 +47,7 @@
|
|||||||
<item-type>Number:Dimensionless</item-type>
|
<item-type>Number:Dimensionless</item-type>
|
||||||
<label>Salt Output (%)</label>
|
<label>Salt Output (%)</label>
|
||||||
<description>Current salt output setting for the chlorinator (%).</description>
|
<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>
|
||||||
|
|
||||||
<channel-type id="scMode">
|
<channel-type id="scMode">
|
||||||
@ -84,20 +84,20 @@
|
|||||||
<item-type>Number:Dimensionless</item-type>
|
<item-type>Number:Dimensionless</item-type>
|
||||||
<label>Average Salt Level</label>
|
<label>Average Salt Level</label>
|
||||||
<description>Average Salt Level</description>
|
<description>Average Salt Level</description>
|
||||||
<state pattern="%1f %unit%" readOnly="true"/>
|
<state pattern="%d %unit%" readOnly="true"/>
|
||||||
</channel-type>
|
</channel-type>
|
||||||
|
|
||||||
<channel-type id="instantSaltLevel">
|
<channel-type id="instantSaltLevel">
|
||||||
<item-type>Number:Dimensionless</item-type>
|
<item-type>Number:Dimensionless</item-type>
|
||||||
<label>Instant Salt Level</label>
|
<label>Instant Salt Level</label>
|
||||||
<description>Instant Salt Level</description>
|
<description>Instant Salt Level</description>
|
||||||
<state pattern="%1f %unit%" readOnly="true"/>
|
<state pattern="%d %unit%" readOnly="true"/>
|
||||||
</channel-type>
|
</channel-type>
|
||||||
|
|
||||||
<channel-type id="status">
|
<channel-type id="status">
|
||||||
<item-type>Number</item-type>
|
<item-type>Number</item-type>
|
||||||
<label>Status</label>
|
<label>Status</label>
|
||||||
<description>Status</description>
|
<description>Status</description>
|
||||||
<state pattern="%1f" readOnly="true"/>
|
<state pattern="%d" readOnly="true"/>
|
||||||
</channel-type>
|
</channel-type>
|
||||||
</thing:thing-descriptions>
|
</thing:thing-descriptions>
|
||||||
|
|||||||
@ -48,7 +48,7 @@
|
|||||||
<item-type>Number:Dimensionless</item-type>
|
<item-type>Number:Dimensionless</item-type>
|
||||||
<label>Filter Speed</label>
|
<label>Filter Speed</label>
|
||||||
<description>Filter Speed in %</description>
|
<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>
|
||||||
|
|
||||||
<channel-type id="filterState">
|
<channel-type id="filterState">
|
||||||
@ -77,7 +77,7 @@
|
|||||||
<item-type>Number:Dimensionless</item-type>
|
<item-type>Number:Dimensionless</item-type>
|
||||||
<label>Last Speed</label>
|
<label>Last Speed</label>
|
||||||
<description>Last Speed</description>
|
<description>Last Speed</description>
|
||||||
<state pattern="%1f %unit%" readOnly="true"/>
|
<state pattern="%d %unit%" readOnly="true"/>
|
||||||
</channel-type>
|
</channel-type>
|
||||||
|
|
||||||
</thing:thing-descriptions>
|
</thing:thing-descriptions>
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
<item-type>Number:Dimensionless</item-type>
|
<item-type>Number:Dimensionless</item-type>
|
||||||
<label>Pump Speed in %</label>
|
<label>Pump Speed in %</label>
|
||||||
<description>Pump Speed</description>
|
<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>
|
</channel-type>
|
||||||
|
|
||||||
</thing:thing-descriptions>
|
</thing:thing-descriptions>
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
<label>Current Setpoint</label>
|
<label>Current Setpoint</label>
|
||||||
<description>Current Setpoint</description>
|
<description>Current Setpoint</description>
|
||||||
<category>Temperature</category>
|
<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>
|
</channel-type>
|
||||||
|
|
||||||
</thing:thing-descriptions>
|
</thing:thing-descriptions>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user