Add channel return temp (#13833)

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
This commit is contained in:
lsiepel
2022-12-09 19:30:08 +01:00
committed by GitHub
parent 108c48dda5
commit d85c2532e4
8 changed files with 46 additions and 6 deletions

View File

@@ -116,6 +116,7 @@ public class PlugwiseHABindingConstants {
public static final String APPLIANCE_DHWSETPOINT_CHANNEL = "dhwSetpoint";
public static final String APPLIANCE_MAXBOILERTEMPERATURE_CHANNEL = "maxBoilerTemperature";
public static final String APPLIANCE_DHWCOMFORTMODE_CHANNEL = "dhwComfortMode";
public static final String APPLIANCE_RETURNWATERTEMPERATURE_CHANNEL = "returnWaterTemperature";
// List of all Appliance Types
public static final String APPLIANCE_TYPE_THERMOSTAT = "thermostat";

View File

@@ -156,6 +156,14 @@ public class Appliance extends PlugwiseBaseModel implements PlugwiseComparableDa
return this.pointLogs.getIntendedBoilerTempUnit();
}
public Optional<Double> getReturnWaterTemp() {
return this.pointLogs.getReturnWaterTemp();
}
public Optional<String> getReturnWaterTempUnit() {
return this.pointLogs.getReturnWaterTempUnit();
}
public Optional<Boolean> getFlameState() {
return this.pointLogs.getFlameState();
}

View File

@@ -47,6 +47,7 @@ public class Logs extends PlugwiseHACollection<Log> {
private static final String CHSTATE = "central_heating_state";
private static final String VALVE_POSITION = "valve_position";
private static final String WATER_PRESSURE = "central_heater_water_pressure";
private static final String RETURNWATERTEMP = "return_water_temperature";
public Optional<Boolean> getCoolingState() {
return this.getLog(COOLINGSTATE).map(logEntry -> logEntry.getMeasurementAsBoolean()).orElse(Optional.empty());
@@ -99,6 +100,14 @@ public class Logs extends PlugwiseHACollection<Log> {
return this.getLog(BOILERTEMP).map(logEntry -> logEntry.getMeasurementUnit()).orElse(Optional.empty());
}
public Optional<Double> getReturnWaterTemp() {
return this.getLog(RETURNWATERTEMP).map(logEntry -> logEntry.getMeasurementAsDouble()).orElse(Optional.empty());
}
public Optional<String> getReturnWaterTempUnit() {
return this.getLog(RETURNWATERTEMP).map(logEntry -> logEntry.getMeasurementUnit()).orElse(Optional.empty());
}
public Optional<Double> getDHTSetpoint() {
return this.getLog(DHWSETPOINT).map(logEntry -> logEntry.getMeasurementAsDouble()).orElse(Optional.empty());
}

View File

@@ -220,6 +220,7 @@ public class PlugwiseHAApplianceHandler extends PlugwiseHABaseHandler<Appliance,
case APPLIANCE_TEMPERATURE_CHANNEL:
case APPLIANCE_VALVEPOSITION_CHANNEL:
case APPLIANCE_WATERPRESSURE_CHANNEL:
case APPLIANCE_RETURNWATERTEMPERATURE_CHANNEL:
state = UnDefType.NULL;
break;
case APPLIANCE_BATTERYLEVELLOW_CHANNEL:
@@ -359,6 +360,14 @@ public class PlugwiseHAApplianceHandler extends PlugwiseHABaseHandler<Appliance,
state = new QuantityType<Dimensionless>(entity.getOTAppFaultCode().get().intValue(), Units.PERCENT);
}
break;
case APPLIANCE_RETURNWATERTEMPERATURE_CHANNEL:
if (entity.getBoilerTemp().isPresent()) {
Unit<Temperature> unit = entity.getReturnWaterTempUnit().orElse(UNIT_CELSIUS).equals(UNIT_CELSIUS)
? SIUnits.CELSIUS
: ImperialUnits.FAHRENHEIT;
state = new QuantityType<Temperature>(entity.getReturnWaterTemp().get(), unit);
}
break;
case APPLIANCE_DHWTEMPERATURE_CHANNEL:
if (entity.getDHWTemp().isPresent()) {
Unit<Temperature> unit = entity.getDHWTempUnit().orElse(UNIT_CELSIUS).equals(UNIT_CELSIUS)

View File

@@ -96,6 +96,8 @@ channel-type.plugwiseha.regulationControl.description = Switch the regulation co
channel-type.plugwiseha.regulationControl.state.option.active = Active
channel-type.plugwiseha.regulationControl.state.option.passive = Passive
channel-type.plugwiseha.regulationControl.state.option.off = Off
channel-type.plugwiseha.returnWaterTemperature.label = Return Water Temperature
channel-type.plugwiseha.returnWaterTemperature.description = Gets the temperature of the boiler return water
channel-type.plugwiseha.setpointTemperature.label = Setpoint Temperature
channel-type.plugwiseha.setpointTemperature.description = Gets or sets the set point of this zone
channel-type.plugwiseha.temperature.label = Zone Temperature

View File

@@ -172,6 +172,14 @@
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="returnWaterTemperature">
<item-type>Number:Temperature</item-type>
<label>Return Water Temperature</label>
<description>Gets the temperature of the return water</description>
<category>heating</category>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="dhwSetpoint">
<item-type>Number:Temperature</item-type>
<label>Domestic Hot Water Setpoint Temperature</label>

View File

@@ -37,6 +37,7 @@
<channel id="boilerTemperature" typeId="boilerTemperature"/>
<channel id="dhwSetpoint" typeId="dhwSetpoint"/>
<channel id="maxBoilerTemperature" typeId="maxBoilerTemperature"/>
<channel id="returnWaterTemperature" typeId="returnWaterTemperature"/>
</channels>
<representation-property>id</representation-property>