[homeconnect] 9 channels added for washer appliance (#10809)

* [homeconnect] 9 channels added for washer appliance

Corresponding to 9 program options not fully supported by the API.

Fix #10704

Signed-off-by: Laurent Garnier <lg.hc@free.fr>

* Review comment: formatting in XML thing file

Signed-off-by: Laurent Garnier <lg.hc@free.fr>

* Review comment: add these new channels (except i-DOS) to washerdryer appliance

Signed-off-by: Laurent Garnier <lg.hc@free.fr>

* Review comment: method isLinkedChannelsForUnsupportedFeatures renamed

Signed-off-by: Laurent Garnier <lg.hc@free.fr>

* Change state options for rinse plus channel

Signed-off-by: Laurent Garnier <lg.hc@free.fr>

* Update the new channels when the active program is updated

Signed-off-by: Laurent Garnier <lg.hc@free.fr>

* Review comment: update documentation

Signed-off-by: Laurent Garnier <lg.hc@free.fr>

* Review comment: typo in channel description

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
lolodomo 2021-06-20 20:03:05 +02:00 committed by GitHub
parent 6296eba14c
commit 3d33ee0ab8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 299 additions and 26 deletions

View File

@ -56,8 +56,17 @@ After the bridge has been added and authorized, devices are discovered automatic
| setpoint_temperature | Number:Temperature | false | This status describes the setpoint/target temperature of the home appliance. | oven | | setpoint_temperature | Number:Temperature | false | This status describes the setpoint/target temperature of the home appliance. | oven |
| laundry_care_washer_temperature | String | false | This status describes the temperature of the washing program of the home appliance. | washer, washerdryer | | laundry_care_washer_temperature | String | false | This status describes the temperature of the washing program of the home appliance. | washer, washerdryer |
| laundry_care_washer_spin_speed | String | false | This status defines the spin speed of a washer program of the home appliance. | washer, washerdryer | | laundry_care_washer_spin_speed | String | false | This status defines the spin speed of a washer program of the home appliance. | washer, washerdryer |
| laundry_care_washer_idos1 | String | false | This status defines the i-Dos 1 dosing level of a washer program of the home appliance (if appliance supports i-Dos). | washer | | laundry_care_washer_idos1_level | String | false | This status defines the i-Dos 1 dosing level of a washer program of the home appliance (if appliance supports i-Dos). | washer |
| laundry_care_washer_idos2 | String | false | This status defines the i-Dos 2 dosing level of a washer program of the home appliance (if appliance supports i-Dos). | washer | | laundry_care_washer_idos2_level | String | false | This status defines the i-Dos 2 dosing level of a washer program of the home appliance (if appliance supports i-Dos). | washer |
| laundry_care_washer_idos1 | Switch | true | This status indicates whether i-Dos 1 is activated for a washer program of the home appliance. (If appliance supports i-Dos) | washer |
| laundry_care_washer_idos2 | Switch | true | This status indicates whether i-Dos 2 is activated for a washer program of the home appliance. (If appliance supports i-Dos) | washer |
| laundry_care_washer_vario_perfect | String | true | This status defines the vario perfect mode of a washer program of the home appliance. | washer, washerdryer |
| laundry_care_washer_less_ironing | Switch | true | This status indicates whether less ironing is activated for a washer program of the home appliance. | washer, washerdryer |
| laundry_care_washer_pre_wash | Switch | true | This status indicates whether the pre-wash is activated for a washer program of the home appliance. | washer, washerdryer |
| laundry_care_washer_rinse_plus | String | true | This status defines the number of additional rinses of a washer program of the home appliance. | washer, washerdryer |
| laundry_care_washer_soak | Switch | true | This status indicates whether the soaking is activated for a washer program of the home appliance. | washer, washerdryer |
| program_energy | Number:Dimensionless | true | This channel provides the estimated energy required in percentage for a program of the home appliance. | washer, washerdryer |
| program_water | Number:Dimensionless | true | This channel provides the estimated water required in percentage for a program of the home appliance. | washer, washerdryer |
| dryer_drying_target | String | false | This status defines the desired dryness of a program of the home appliance. | dryer, washerdryer | | dryer_drying_target | String | false | This status defines the desired dryness of a program of the home appliance. | dryer, washerdryer |
| setpoint_temperature_refrigerator | Number:Temperature | false | Target temperature of the refrigerator compartment (range depends on appliance - common range 2 to 8°C). | fridgefreezer | | setpoint_temperature_refrigerator | Number:Temperature | false | Target temperature of the refrigerator compartment (range depends on appliance - common range 2 to 8°C). | fridgefreezer |
| setpoint_temperature_freezer | Number:Temperature | false | Target temperature of the freezer compartment (range depends on appliance - common range -16 to -24°C). | fridgefreezer | | setpoint_temperature_freezer | Number:Temperature | false | Target temperature of the freezer compartment (range depends on appliance - common range -16 to -24°C). | fridgefreezer |

View File

@ -120,8 +120,17 @@ public class HomeConnectBindingConstants {
public static final String CHANNEL_DURATION = "duration"; public static final String CHANNEL_DURATION = "duration";
public static final String CHANNEL_WASHER_TEMPERATURE = "laundry_care_washer_temperature"; public static final String CHANNEL_WASHER_TEMPERATURE = "laundry_care_washer_temperature";
public static final String CHANNEL_WASHER_SPIN_SPEED = "laundry_care_washer_spin_speed"; public static final String CHANNEL_WASHER_SPIN_SPEED = "laundry_care_washer_spin_speed";
public static final String CHANNEL_WASHER_IDOS1_LEVEL = "laundry_care_washer_idos1_level";
public static final String CHANNEL_WASHER_IDOS2_LEVEL = "laundry_care_washer_idos2_level";
public static final String CHANNEL_WASHER_IDOS1 = "laundry_care_washer_idos1"; public static final String CHANNEL_WASHER_IDOS1 = "laundry_care_washer_idos1";
public static final String CHANNEL_WASHER_IDOS2 = "laundry_care_washer_idos2"; public static final String CHANNEL_WASHER_IDOS2 = "laundry_care_washer_idos2";
public static final String CHANNEL_WASHER_VARIO_PERFECT = "laundry_care_washer_vario_perfect";
public static final String CHANNEL_WASHER_LESS_IRONING = "laundry_care_washer_less_ironing";
public static final String CHANNEL_WASHER_PRE_WASH = "laundry_care_washer_pre_wash";
public static final String CHANNEL_WASHER_RINSE_PLUS = "laundry_care_washer_rinse_plus";
public static final String CHANNEL_WASHER_SOAK = "laundry_care_washer_soak";
public static final String CHANNEL_PROGRAM_ENERGY = "program_energy";
public static final String CHANNEL_PROGRAM_WATER = "program_water";
public static final String CHANNEL_REFRIGERATOR_SETPOINT_TEMPERATURE = "setpoint_temperature_refrigerator"; public static final String CHANNEL_REFRIGERATOR_SETPOINT_TEMPERATURE = "setpoint_temperature_refrigerator";
public static final String CHANNEL_REFRIGERATOR_SUPER_MODE = "super_mode_refrigerator"; public static final String CHANNEL_REFRIGERATOR_SUPER_MODE = "super_mode_refrigerator";
public static final String CHANNEL_FREEZER_SETPOINT_TEMPERATURE = "setpoint_temperature_freezer"; public static final String CHANNEL_FREEZER_SETPOINT_TEMPERATURE = "setpoint_temperature_freezer";
@ -173,6 +182,15 @@ public class HomeConnectBindingConstants {
public static final String OPTION_WASHER_SPIN_SPEED = "LaundryCare.Washer.Option.SpinSpeed"; public static final String OPTION_WASHER_SPIN_SPEED = "LaundryCare.Washer.Option.SpinSpeed";
public static final String OPTION_WASHER_IDOS_1_DOSING_LEVEL = "LaundryCare.Washer.Option.IDos1DosingLevel"; public static final String OPTION_WASHER_IDOS_1_DOSING_LEVEL = "LaundryCare.Washer.Option.IDos1DosingLevel";
public static final String OPTION_WASHER_IDOS_2_DOSING_LEVEL = "LaundryCare.Washer.Option.IDos2DosingLevel"; public static final String OPTION_WASHER_IDOS_2_DOSING_LEVEL = "LaundryCare.Washer.Option.IDos2DosingLevel";
public static final String OPTION_WASHER_IDOS_1_ACTIVE = "LaundryCare.Washer.Option.IDos1.Active";
public static final String OPTION_WASHER_IDOS_2_ACTIVE = "LaundryCare.Washer.Option.IDos2.Active";
public static final String OPTION_WASHER_VARIO_PERFECT = "LaundryCare.Common.Option.VarioPerfect";
public static final String OPTION_WASHER_LESS_IRONING = "LaundryCare.Washer.Option.LessIroning";
public static final String OPTION_WASHER_PRE_WASH = "LaundryCare.Washer.Option.Prewash";
public static final String OPTION_WASHER_RINSE_PLUS = "LaundryCare.Washer.Option.RinsePlus";
public static final String OPTION_WASHER_SOAK = "LaundryCare.Washer.Option.Soak";
public static final String OPTION_WASHER_ENERGY_FORECAST = "BSH.Common.Option.EnergyForecast";
public static final String OPTION_WASHER_WATER_FORECAST = "BSH.Common.Option.WaterForecast";
public static final String OPTION_DRYER_DRYING_TARGET = "LaundryCare.Dryer.Option.DryingTarget"; public static final String OPTION_DRYER_DRYING_TARGET = "LaundryCare.Dryer.Option.DryingTarget";
public static final String OPTION_HOOD_VENTING_LEVEL = "Cooking.Common.Option.Hood.VentingLevel"; public static final String OPTION_HOOD_VENTING_LEVEL = "Cooking.Common.Option.Hood.VentingLevel";
public static final String OPTION_HOOD_INTENSIVE_LEVEL = "Cooking.Common.Option.Hood.IntensiveLevel"; public static final String OPTION_HOOD_INTENSIVE_LEVEL = "Cooking.Common.Option.Hood.IntensiveLevel";

View File

@ -485,6 +485,10 @@ public abstract class AbstractHomeConnectThingHandler extends BaseThingHandler i
*/ */
protected abstract void configureEventHandlers(final Map<String, EventHandler> handlers); protected abstract void configureEventHandlers(final Map<String, EventHandler> handlers);
protected boolean isChannelLinkedToProgramOptionNotFullySupportedByApi() {
return false;
}
/** /**
* Update all channels via API. * Update all channels via API.
* *
@ -795,16 +799,16 @@ public abstract class AbstractHomeConnectThingHandler extends BaseThingHandler i
getThingChannel(CHANNEL_OPERATION_STATE).ifPresent(channel -> updateState(channel.getUID(), getThingChannel(CHANNEL_OPERATION_STATE).ifPresent(channel -> updateState(channel.getUID(),
value == null ? UnDefType.UNDEF : new StringType(mapStringType(value)))); value == null ? UnDefType.UNDEF : new StringType(mapStringType(value))));
if (STATE_OPERATION_FINISHED.equals(event.getValue())) { if (STATE_OPERATION_FINISHED.equals(value)) {
getThingChannel(CHANNEL_PROGRAM_PROGRESS_STATE) getThingChannel(CHANNEL_PROGRAM_PROGRESS_STATE)
.ifPresent(c -> updateState(c.getUID(), new QuantityType<>(100, PERCENT))); .ifPresent(c -> updateState(c.getUID(), new QuantityType<>(100, PERCENT)));
getThingChannel(CHANNEL_REMAINING_PROGRAM_TIME_STATE) getThingChannel(CHANNEL_REMAINING_PROGRAM_TIME_STATE)
.ifPresent(c -> updateState(c.getUID(), new QuantityType<>(0, SECOND))); .ifPresent(c -> updateState(c.getUID(), new QuantityType<>(0, SECOND)));
} else if (STATE_OPERATION_RUN.equals(event.getValue())) { } else if (STATE_OPERATION_RUN.equals(value)) {
getThingChannel(CHANNEL_PROGRAM_PROGRESS_STATE) getThingChannel(CHANNEL_PROGRAM_PROGRESS_STATE)
.ifPresent(c -> updateState(c.getUID(), new QuantityType<>(0, PERCENT))); .ifPresent(c -> updateState(c.getUID(), new QuantityType<>(0, PERCENT)));
getThingChannel(CHANNEL_ACTIVE_PROGRAM_STATE).ifPresent(c -> updateChannel(c.getUID())); getThingChannel(CHANNEL_ACTIVE_PROGRAM_STATE).ifPresent(c -> updateChannel(c.getUID()));
} else if (STATE_OPERATION_READY.equals(event.getValue())) { } else if (STATE_OPERATION_READY.equals(value)) {
resetProgramStateChannels(false); resetProgramStateChannels(false);
} }
}; };
@ -815,12 +819,37 @@ public abstract class AbstractHomeConnectThingHandler extends BaseThingHandler i
String value = event.getValue(); String value = event.getValue();
getThingChannel(CHANNEL_ACTIVE_PROGRAM_STATE).ifPresent(channel -> updateState(channel.getUID(), getThingChannel(CHANNEL_ACTIVE_PROGRAM_STATE).ifPresent(channel -> updateState(channel.getUID(),
value == null ? UnDefType.UNDEF : new StringType(mapStringType(value)))); value == null ? UnDefType.UNDEF : new StringType(mapStringType(value))));
if (event.getValue() == null) { if (value == null) {
resetProgramStateChannels(false); resetProgramStateChannels(false);
} }
}; };
} }
protected EventHandler updateProgramOptionsAndActiveProgramStateEventHandler() {
return event -> {
String value = event.getValue();
getThingChannel(CHANNEL_ACTIVE_PROGRAM_STATE).ifPresent(channel -> updateState(channel.getUID(),
value == null ? UnDefType.UNDEF : new StringType(mapStringType(value))));
if (value == null) {
resetProgramStateChannels(false);
} else {
try {
Optional<HomeConnectApiClient> apiClient = getApiClient();
if (apiClient.isPresent() && isChannelLinkedToProgramOptionNotFullySupportedByApi()
&& apiClient.get().isRemoteControlActive(getThingHaId())) {
// update channels linked to program options
Program program = apiClient.get().getSelectedProgram(getThingHaId());
if (program != null) {
processProgramOptions(program.getOptions());
}
}
} catch (CommunicationException | ApplianceOfflineException | AuthorizationException e) {
logger.debug("Could not update program options. {}", e.getMessage());
}
}
};
}
protected EventHandler defaultEventPresentStateEventHandler(String channelId) { protected EventHandler defaultEventPresentStateEventHandler(String channelId) {
return event -> getThingChannel(channelId).ifPresent(channel -> updateState(channel.getUID(), return event -> getThingChannel(channelId).ifPresent(channel -> updateState(channel.getUID(),
OnOffType.from(!STATE_EVENT_PRESENT_STATE_OFF.equals(event.getValue())))); OnOffType.from(!STATE_EVENT_PRESENT_STATE_OFF.equals(event.getValue()))));
@ -863,13 +892,25 @@ public abstract class AbstractHomeConnectThingHandler extends BaseThingHandler i
return event -> { return event -> {
defaultBooleanEventHandler(CHANNEL_REMOTE_CONTROL_ACTIVE_STATE).handle(event); defaultBooleanEventHandler(CHANNEL_REMOTE_CONTROL_ACTIVE_STATE).handle(event);
// update available program options if update was previously delayed and remote control is enabled
try { try {
String programKey = programOptionsDelayedUpdate; if (Boolean.parseBoolean(event.getValue())) {
if (programKey != null && Boolean.parseBoolean(event.getValue())) { // update available program options if update was previously delayed and remote control is enabled
logger.debug("Delayed update of options for program {}", programKey); String programKey = programOptionsDelayedUpdate;
updateProgramOptionsStateDescriptions(programKey); if (programKey != null) {
programOptionsDelayedUpdate = null; logger.debug("Delayed update of options for program {}", programKey);
updateProgramOptionsStateDescriptions(programKey);
programOptionsDelayedUpdate = null;
}
if (isChannelLinkedToProgramOptionNotFullySupportedByApi()) {
Optional<HomeConnectApiClient> apiClient = getApiClient();
if (apiClient.isPresent()) {
Program program = apiClient.get().getSelectedProgram(getThingHaId());
if (program != null) {
processProgramOptions(program.getOptions());
}
}
}
} }
} catch (CommunicationException | ApplianceOfflineException | AuthorizationException e) { } catch (CommunicationException | ApplianceOfflineException | AuthorizationException e) {
logger.debug("Could not update program options. {}", e.getMessage()); logger.debug("Could not update program options. {}", e.getMessage());
@ -881,19 +922,32 @@ public abstract class AbstractHomeConnectThingHandler extends BaseThingHandler i
return event -> { return event -> {
defaultSelectedProgramStateEventHandler().handle(event); defaultSelectedProgramStateEventHandler().handle(event);
// update available program options
try { try {
Optional<HomeConnectApiClient> apiClient = getApiClient(); Optional<HomeConnectApiClient> apiClient = getApiClient();
String programKey = event.getValue(); String programKey = event.getValue();
if (apiClient.isPresent() && programKey != null) { if (apiClient.isPresent() && programKey != null) {
// Delay the update if options are not yet cached and remote control is disabled Boolean remoteControl = (availableProgramOptionsCache.get(programKey) == null
if (availableProgramOptionsCache.get(programKey) == null || isChannelLinkedToProgramOptionNotFullySupportedByApi())
&& !apiClient.get().isRemoteControlActive(getThingHaId())) { ? apiClient.get().isRemoteControlActive(getThingHaId())
: false;
// Delay the update of available program options if options are not yet cached and remote control is
// disabled
if (availableProgramOptionsCache.get(programKey) == null && !remoteControl) {
logger.debug("Delay update of options for program {}", programKey); logger.debug("Delay update of options for program {}", programKey);
programOptionsDelayedUpdate = programKey; programOptionsDelayedUpdate = programKey;
} else { } else {
updateProgramOptionsStateDescriptions(programKey); updateProgramOptionsStateDescriptions(programKey);
} }
if (isChannelLinkedToProgramOptionNotFullySupportedByApi() && remoteControl) {
// update channels linked to program options
Program program = apiClient.get().getSelectedProgram(getThingHaId());
if (program != null) {
processProgramOptions(program.getOptions());
}
}
} }
} catch (CommunicationException | ApplianceOfflineException | AuthorizationException e) { } catch (CommunicationException | ApplianceOfflineException | AuthorizationException e) {
logger.debug("Could not update program options. {}", e.getMessage()); logger.debug("Could not update program options. {}", e.getMessage());
@ -1288,11 +1342,11 @@ public abstract class AbstractHomeConnectThingHandler extends BaseThingHandler i
.ifPresent(channel -> updateState(channel.getUID(), new StringType(option.getValue()))); .ifPresent(channel -> updateState(channel.getUID(), new StringType(option.getValue())));
break; break;
case OPTION_WASHER_IDOS_1_DOSING_LEVEL: case OPTION_WASHER_IDOS_1_DOSING_LEVEL:
getThingChannel(CHANNEL_WASHER_IDOS1) getThingChannel(CHANNEL_WASHER_IDOS1_LEVEL)
.ifPresent(channel -> updateState(channel.getUID(), new StringType(option.getValue()))); .ifPresent(channel -> updateState(channel.getUID(), new StringType(option.getValue())));
break; break;
case OPTION_WASHER_IDOS_2_DOSING_LEVEL: case OPTION_WASHER_IDOS_2_DOSING_LEVEL:
getThingChannel(CHANNEL_WASHER_IDOS2) getThingChannel(CHANNEL_WASHER_IDOS2_LEVEL)
.ifPresent(channel -> updateState(channel.getUID(), new StringType(option.getValue()))); .ifPresent(channel -> updateState(channel.getUID(), new StringType(option.getValue())));
break; break;
case OPTION_DRYER_DRYING_TARGET: case OPTION_DRYER_DRYING_TARGET:
@ -1338,6 +1392,42 @@ public abstract class AbstractHomeConnectThingHandler extends BaseThingHandler i
.ifPresent(channel -> updateState(channel.getUID(), .ifPresent(channel -> updateState(channel.getUID(),
new QuantityType<>(option.getValueAsInt(), PERCENT))); new QuantityType<>(option.getValueAsInt(), PERCENT)));
break; break;
case OPTION_WASHER_IDOS_1_ACTIVE:
getThingChannel(CHANNEL_WASHER_IDOS1).ifPresent(
channel -> updateState(channel.getUID(), OnOffType.from(option.getValueAsBoolean())));
break;
case OPTION_WASHER_IDOS_2_ACTIVE:
getThingChannel(CHANNEL_WASHER_IDOS2).ifPresent(
channel -> updateState(channel.getUID(), OnOffType.from(option.getValueAsBoolean())));
break;
case OPTION_WASHER_VARIO_PERFECT:
getThingChannel(CHANNEL_WASHER_VARIO_PERFECT)
.ifPresent(channel -> updateState(channel.getUID(), new StringType(option.getValue())));
break;
case OPTION_WASHER_LESS_IRONING:
getThingChannel(CHANNEL_WASHER_LESS_IRONING).ifPresent(
channel -> updateState(channel.getUID(), OnOffType.from(option.getValueAsBoolean())));
break;
case OPTION_WASHER_PRE_WASH:
getThingChannel(CHANNEL_WASHER_PRE_WASH).ifPresent(
channel -> updateState(channel.getUID(), OnOffType.from(option.getValueAsBoolean())));
break;
case OPTION_WASHER_RINSE_PLUS:
getThingChannel(CHANNEL_WASHER_RINSE_PLUS)
.ifPresent(channel -> updateState(channel.getUID(), new StringType(option.getValue())));
break;
case OPTION_WASHER_SOAK:
getThingChannel(CHANNEL_WASHER_SOAK).ifPresent(
channel -> updateState(channel.getUID(), OnOffType.from(option.getValueAsBoolean())));
break;
case OPTION_WASHER_ENERGY_FORECAST:
getThingChannel(CHANNEL_PROGRAM_ENERGY).ifPresent(channel -> updateState(channel.getUID(),
new QuantityType<>(option.getValueAsInt(), PERCENT)));
break;
case OPTION_WASHER_WATER_FORECAST:
getThingChannel(CHANNEL_PROGRAM_WATER).ifPresent(channel -> updateState(channel.getUID(),
new QuantityType<>(option.getValueAsInt(), PERCENT)));
break;
} }
} }
}); });

View File

@ -67,6 +67,20 @@ public class HomeConnectWasherDryerHandler extends AbstractHomeConnectThingHandl
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler()); getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_TEMPERATURE, handlers.put(CHANNEL_WASHER_TEMPERATURE,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler()); getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_VARIO_PERFECT,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_LESS_IRONING,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_PRE_WASH,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_RINSE_PLUS,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_SOAK,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_PROGRAM_ENERGY,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_PROGRAM_WATER,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
// register dryer specific handlers // register dryer specific handlers
handlers.put(CHANNEL_DRYER_DRYING_TARGET, handlers.put(CHANNEL_DRYER_DRYING_TARGET,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler()); getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
@ -83,7 +97,7 @@ public class HomeConnectWasherDryerHandler extends AbstractHomeConnectThingHandl
handlers.put(EVENT_REMAINING_PROGRAM_TIME, defaultRemainingProgramTimeEventHandler()); handlers.put(EVENT_REMAINING_PROGRAM_TIME, defaultRemainingProgramTimeEventHandler());
handlers.put(EVENT_PROGRAM_PROGRESS, defaultPercentQuantityTypeEventHandler(CHANNEL_PROGRAM_PROGRESS_STATE)); handlers.put(EVENT_PROGRAM_PROGRESS, defaultPercentQuantityTypeEventHandler(CHANNEL_PROGRAM_PROGRESS_STATE));
handlers.put(EVENT_LOCAL_CONTROL_ACTIVE, defaultBooleanEventHandler(CHANNEL_LOCAL_CONTROL_ACTIVE_STATE)); handlers.put(EVENT_LOCAL_CONTROL_ACTIVE, defaultBooleanEventHandler(CHANNEL_LOCAL_CONTROL_ACTIVE_STATE));
handlers.put(EVENT_ACTIVE_PROGRAM, defaultActiveProgramEventHandler()); handlers.put(EVENT_ACTIVE_PROGRAM, updateProgramOptionsAndActiveProgramStateEventHandler());
handlers.put(EVENT_OPERATION_STATE, defaultOperationStateEventHandler()); handlers.put(EVENT_OPERATION_STATE, defaultOperationStateEventHandler());
handlers.put(EVENT_SELECTED_PROGRAM, updateProgramOptionsAndSelectedProgramStateEventHandler()); handlers.put(EVENT_SELECTED_PROGRAM, updateProgramOptionsAndSelectedProgramStateEventHandler());
@ -100,6 +114,17 @@ public class HomeConnectWasherDryerHandler extends AbstractHomeConnectThingHandl
event.getValue() == null ? UnDefType.UNDEF : new StringType(event.getValue())))); event.getValue() == null ? UnDefType.UNDEF : new StringType(event.getValue()))));
} }
@Override
protected boolean isChannelLinkedToProgramOptionNotFullySupportedByApi() {
return (getThingChannel(CHANNEL_WASHER_VARIO_PERFECT).isPresent() && isLinked(CHANNEL_WASHER_VARIO_PERFECT))
|| (getThingChannel(CHANNEL_WASHER_LESS_IRONING).isPresent() && isLinked(CHANNEL_WASHER_LESS_IRONING))
|| (getThingChannel(CHANNEL_WASHER_PRE_WASH).isPresent() && isLinked(CHANNEL_WASHER_PRE_WASH))
|| (getThingChannel(CHANNEL_WASHER_RINSE_PLUS).isPresent() && isLinked(CHANNEL_WASHER_RINSE_PLUS))
|| (getThingChannel(CHANNEL_WASHER_SOAK).isPresent() && isLinked(CHANNEL_WASHER_SOAK))
|| (getThingChannel(CHANNEL_PROGRAM_ENERGY).isPresent() && isLinked(CHANNEL_PROGRAM_ENERGY))
|| (getThingChannel(CHANNEL_PROGRAM_WATER).isPresent() && isLinked(CHANNEL_PROGRAM_WATER));
}
@Override @Override
protected void handleCommand(final ChannelUID channelUID, final Command command, protected void handleCommand(final ChannelUID channelUID, final Command command,
final HomeConnectApiClient apiClient) final HomeConnectApiClient apiClient)
@ -143,6 +168,13 @@ public class HomeConnectWasherDryerHandler extends AbstractHomeConnectThingHandl
if (offline) { if (offline) {
getThingChannel(CHANNEL_WASHER_TEMPERATURE).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF)); getThingChannel(CHANNEL_WASHER_TEMPERATURE).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_WASHER_SPIN_SPEED).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF)); getThingChannel(CHANNEL_WASHER_SPIN_SPEED).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_WASHER_VARIO_PERFECT).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_WASHER_LESS_IRONING).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_WASHER_PRE_WASH).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_WASHER_RINSE_PLUS).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_WASHER_SOAK).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_PROGRAM_ENERGY).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_PROGRAM_WATER).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_DRYER_DRYING_TARGET).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF)); getThingChannel(CHANNEL_DRYER_DRYING_TARGET).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
} }
} }

View File

@ -67,10 +67,28 @@ public class HomeConnectWasherHandler extends AbstractHomeConnectThingHandler {
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler()); getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_TEMPERATURE, handlers.put(CHANNEL_WASHER_TEMPERATURE,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler()); getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_IDOS1_LEVEL,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_IDOS2_LEVEL,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_IDOS1, handlers.put(CHANNEL_WASHER_IDOS1,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler()); getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_IDOS2, handlers.put(CHANNEL_WASHER_IDOS2,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler()); getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_VARIO_PERFECT,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_LESS_IRONING,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_PRE_WASH,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_RINSE_PLUS,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_SOAK,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_PROGRAM_ENERGY,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_PROGRAM_WATER,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
} }
@Override @Override
@ -84,7 +102,7 @@ public class HomeConnectWasherHandler extends AbstractHomeConnectThingHandler {
handlers.put(EVENT_REMAINING_PROGRAM_TIME, defaultRemainingProgramTimeEventHandler()); handlers.put(EVENT_REMAINING_PROGRAM_TIME, defaultRemainingProgramTimeEventHandler());
handlers.put(EVENT_PROGRAM_PROGRESS, defaultPercentQuantityTypeEventHandler(CHANNEL_PROGRAM_PROGRESS_STATE)); handlers.put(EVENT_PROGRAM_PROGRESS, defaultPercentQuantityTypeEventHandler(CHANNEL_PROGRAM_PROGRESS_STATE));
handlers.put(EVENT_LOCAL_CONTROL_ACTIVE, defaultBooleanEventHandler(CHANNEL_LOCAL_CONTROL_ACTIVE_STATE)); handlers.put(EVENT_LOCAL_CONTROL_ACTIVE, defaultBooleanEventHandler(CHANNEL_LOCAL_CONTROL_ACTIVE_STATE));
handlers.put(EVENT_ACTIVE_PROGRAM, defaultActiveProgramEventHandler()); handlers.put(EVENT_ACTIVE_PROGRAM, updateProgramOptionsAndActiveProgramStateEventHandler());
handlers.put(EVENT_OPERATION_STATE, defaultOperationStateEventHandler()); handlers.put(EVENT_OPERATION_STATE, defaultOperationStateEventHandler());
handlers.put(EVENT_SELECTED_PROGRAM, updateProgramOptionsAndSelectedProgramStateEventHandler()); handlers.put(EVENT_SELECTED_PROGRAM, updateProgramOptionsAndSelectedProgramStateEventHandler());
@ -96,13 +114,26 @@ public class HomeConnectWasherHandler extends AbstractHomeConnectThingHandler {
event -> getThingChannel(CHANNEL_WASHER_SPIN_SPEED).ifPresent(channel -> updateState(channel.getUID(), event -> getThingChannel(CHANNEL_WASHER_SPIN_SPEED).ifPresent(channel -> updateState(channel.getUID(),
event.getValue() == null ? UnDefType.UNDEF : new StringType(event.getValue())))); event.getValue() == null ? UnDefType.UNDEF : new StringType(event.getValue()))));
handlers.put(EVENT_WASHER_IDOS_1_DOSING_LEVEL, handlers.put(EVENT_WASHER_IDOS_1_DOSING_LEVEL,
event -> getThingChannel(CHANNEL_WASHER_IDOS1).ifPresent(channel -> updateState(channel.getUID(), event -> getThingChannel(CHANNEL_WASHER_IDOS1_LEVEL).ifPresent(channel -> updateState(channel.getUID(),
event.getValue() == null ? UnDefType.UNDEF : new StringType(event.getValue())))); event.getValue() == null ? UnDefType.UNDEF : new StringType(event.getValue()))));
handlers.put(EVENT_WASHER_IDOS_2_DOSING_LEVEL, handlers.put(EVENT_WASHER_IDOS_2_DOSING_LEVEL,
event -> getThingChannel(CHANNEL_WASHER_IDOS2).ifPresent(channel -> updateState(channel.getUID(), event -> getThingChannel(CHANNEL_WASHER_IDOS2_LEVEL).ifPresent(channel -> updateState(channel.getUID(),
event.getValue() == null ? UnDefType.UNDEF : new StringType(event.getValue())))); event.getValue() == null ? UnDefType.UNDEF : new StringType(event.getValue()))));
} }
@Override
protected boolean isChannelLinkedToProgramOptionNotFullySupportedByApi() {
return (getThingChannel(CHANNEL_WASHER_IDOS1).isPresent() && isLinked(CHANNEL_WASHER_IDOS1))
|| (getThingChannel(CHANNEL_WASHER_IDOS2).isPresent() && isLinked(CHANNEL_WASHER_IDOS2))
|| (getThingChannel(CHANNEL_WASHER_VARIO_PERFECT).isPresent() && isLinked(CHANNEL_WASHER_VARIO_PERFECT))
|| (getThingChannel(CHANNEL_WASHER_LESS_IRONING).isPresent() && isLinked(CHANNEL_WASHER_LESS_IRONING))
|| (getThingChannel(CHANNEL_WASHER_PRE_WASH).isPresent() && isLinked(CHANNEL_WASHER_PRE_WASH))
|| (getThingChannel(CHANNEL_WASHER_RINSE_PLUS).isPresent() && isLinked(CHANNEL_WASHER_RINSE_PLUS))
|| (getThingChannel(CHANNEL_WASHER_SOAK).isPresent() && isLinked(CHANNEL_WASHER_SOAK))
|| (getThingChannel(CHANNEL_PROGRAM_ENERGY).isPresent() && isLinked(CHANNEL_PROGRAM_ENERGY))
|| (getThingChannel(CHANNEL_PROGRAM_WATER).isPresent() && isLinked(CHANNEL_PROGRAM_WATER));
}
@Override @Override
protected void handleCommand(final ChannelUID channelUID, final Command command, protected void handleCommand(final ChannelUID channelUID, final Command command,
final HomeConnectApiClient apiClient) final HomeConnectApiClient apiClient)
@ -121,11 +152,11 @@ public class HomeConnectWasherHandler extends AbstractHomeConnectThingHandler {
apiClient.setProgramOptions(getThingHaId(), OPTION_WASHER_SPIN_SPEED, command.toFullString(), null, apiClient.setProgramOptions(getThingHaId(), OPTION_WASHER_SPIN_SPEED, command.toFullString(), null,
false, false); false, false);
break; break;
case CHANNEL_WASHER_IDOS1: case CHANNEL_WASHER_IDOS1_LEVEL:
apiClient.setProgramOptions(getThingHaId(), OPTION_WASHER_IDOS_1_DOSING_LEVEL, apiClient.setProgramOptions(getThingHaId(), OPTION_WASHER_IDOS_1_DOSING_LEVEL,
command.toFullString(), null, false, false); command.toFullString(), null, false, false);
break; break;
case CHANNEL_WASHER_IDOS2: case CHANNEL_WASHER_IDOS2_LEVEL:
apiClient.setProgramOptions(getThingHaId(), OPTION_WASHER_IDOS_2_DOSING_LEVEL, apiClient.setProgramOptions(getThingHaId(), OPTION_WASHER_IDOS_2_DOSING_LEVEL,
command.toFullString(), null, false, false); command.toFullString(), null, false, false);
break; break;
@ -150,8 +181,17 @@ public class HomeConnectWasherHandler extends AbstractHomeConnectThingHandler {
if (offline) { if (offline) {
getThingChannel(CHANNEL_WASHER_TEMPERATURE).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF)); getThingChannel(CHANNEL_WASHER_TEMPERATURE).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_WASHER_SPIN_SPEED).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF)); getThingChannel(CHANNEL_WASHER_SPIN_SPEED).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_WASHER_IDOS1_LEVEL).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_WASHER_IDOS2_LEVEL).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_WASHER_IDOS1).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF)); getThingChannel(CHANNEL_WASHER_IDOS1).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_WASHER_IDOS2).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF)); getThingChannel(CHANNEL_WASHER_IDOS2).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_WASHER_VARIO_PERFECT).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_WASHER_LESS_IRONING).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_WASHER_PRE_WASH).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_WASHER_RINSE_PLUS).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_WASHER_SOAK).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_PROGRAM_ENERGY).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
getThingChannel(CHANNEL_PROGRAM_WATER).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
} }
} }
} }

View File

@ -108,8 +108,17 @@
<channel id="selected_program_state" typeId="selected_program_state"/> <channel id="selected_program_state" typeId="selected_program_state"/>
<channel id="laundry_care_washer_temperature" typeId="laundry_care_washer_temperature"/> <channel id="laundry_care_washer_temperature" typeId="laundry_care_washer_temperature"/>
<channel id="laundry_care_washer_spin_speed" typeId="laundry_care_washer_spin_speed"/> <channel id="laundry_care_washer_spin_speed" typeId="laundry_care_washer_spin_speed"/>
<channel id="laundry_care_washer_idos1_level" typeId="laundry_care_washer_idos1_level"/>
<channel id="laundry_care_washer_idos2_level" typeId="laundry_care_washer_idos2_level"/>
<channel id="laundry_care_washer_idos1" typeId="laundry_care_washer_idos1"/> <channel id="laundry_care_washer_idos1" typeId="laundry_care_washer_idos1"/>
<channel id="laundry_care_washer_idos2" typeId="laundry_care_washer_idos2"/> <channel id="laundry_care_washer_idos2" typeId="laundry_care_washer_idos2"/>
<channel id="laundry_care_washer_vario_perfect" typeId="laundry_care_washer_vario_perfect"/>
<channel id="laundry_care_washer_less_ironing" typeId="laundry_care_washer_less_ironing"/>
<channel id="laundry_care_washer_pre_wash" typeId="laundry_care_washer_pre_wash"/>
<channel id="laundry_care_washer_rinse_plus" typeId="laundry_care_washer_rinse_plus"/>
<channel id="laundry_care_washer_soak" typeId="laundry_care_washer_soak"/>
<channel id="program_energy" typeId="program_energy"/>
<channel id="program_water" typeId="program_water"/>
<channel id="basic_actions_state" typeId="basic_actions_state"/> <channel id="basic_actions_state" typeId="basic_actions_state"/>
<channel id="remaining_program_time_state" typeId="remaining_program_time_state"/> <channel id="remaining_program_time_state" typeId="remaining_program_time_state"/>
<channel id="program_progress_state" typeId="program_progress_state"/> <channel id="program_progress_state" typeId="program_progress_state"/>
@ -140,6 +149,13 @@
<channel id="selected_program_state" typeId="selected_program_state"/> <channel id="selected_program_state" typeId="selected_program_state"/>
<channel id="laundry_care_washer_temperature" typeId="laundry_care_washer_temperature"/> <channel id="laundry_care_washer_temperature" typeId="laundry_care_washer_temperature"/>
<channel id="laundry_care_washer_spin_speed" typeId="laundry_care_washer_spin_speed"/> <channel id="laundry_care_washer_spin_speed" typeId="laundry_care_washer_spin_speed"/>
<channel id="laundry_care_washer_vario_perfect" typeId="laundry_care_washer_vario_perfect"/>
<channel id="laundry_care_washer_less_ironing" typeId="laundry_care_washer_less_ironing"/>
<channel id="laundry_care_washer_pre_wash" typeId="laundry_care_washer_pre_wash"/>
<channel id="laundry_care_washer_rinse_plus" typeId="laundry_care_washer_rinse_plus"/>
<channel id="laundry_care_washer_soak" typeId="laundry_care_washer_soak"/>
<channel id="program_energy" typeId="program_energy"/>
<channel id="program_water" typeId="program_water"/>
<channel id="dryer_drying_target" typeId="dryer_drying_target"/> <channel id="dryer_drying_target" typeId="dryer_drying_target"/>
<channel id="basic_actions_state" typeId="basic_actions_state"/> <channel id="basic_actions_state" typeId="basic_actions_state"/>
<channel id="remaining_program_time_state" typeId="remaining_program_time_state"/> <channel id="remaining_program_time_state" typeId="remaining_program_time_state"/>
@ -451,7 +467,7 @@
</state> </state>
<autoUpdatePolicy>veto</autoUpdatePolicy> <autoUpdatePolicy>veto</autoUpdatePolicy>
</channel-type> </channel-type>
<channel-type id="laundry_care_washer_idos1"> <channel-type id="laundry_care_washer_idos1_level">
<item-type>String</item-type> <item-type>String</item-type>
<label>i-Dos 1 Dosing Level</label> <label>i-Dos 1 Dosing Level</label>
<description>This status defines the i-Dos dosing level of a washer program of the home appliance. (If appliance <description>This status defines the i-Dos dosing level of a washer program of the home appliance. (If appliance
@ -466,7 +482,7 @@
</state> </state>
<autoUpdatePolicy>veto</autoUpdatePolicy> <autoUpdatePolicy>veto</autoUpdatePolicy>
</channel-type> </channel-type>
<channel-type id="laundry_care_washer_idos2"> <channel-type id="laundry_care_washer_idos2_level">
<item-type>String</item-type> <item-type>String</item-type>
<label>i-Dos 2 Dosing Level</label> <label>i-Dos 2 Dosing Level</label>
<description>This status defines the i-Dos dosing level of a washer program of the home appliance. (If appliance <description>This status defines the i-Dos dosing level of a washer program of the home appliance. (If appliance
@ -481,6 +497,74 @@
</state> </state>
<autoUpdatePolicy>veto</autoUpdatePolicy> <autoUpdatePolicy>veto</autoUpdatePolicy>
</channel-type> </channel-type>
<channel-type id="laundry_care_washer_idos1" advanced="true">
<item-type>Switch</item-type>
<label>i-Dos 1</label>
<description>This status indicates whether i-Dos 1 is activated for a washer program of the home appliance. (If
appliance supports i-Dos)</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="laundry_care_washer_idos2" advanced="true">
<item-type>Switch</item-type>
<label>i-Dos 2</label>
<description>This status indicates whether i-Dos 2 is activated for a washer program of the home appliance. (If
appliance supports i-Dos)</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="laundry_care_washer_vario_perfect" advanced="true">
<item-type>String</item-type>
<label>Vario Perfect</label>
<description>This status defines the vario perfect mode of a washer program of the home appliance.</description>
<state readOnly="true">
<options>
<option value="LaundryCare.Common.EnumType.VarioPerfect.Off">Off</option>
<option value="LaundryCare.Common.EnumType.VarioPerfect.SpeedPerfect">Vario Speed</option>
</options>
</state>
</channel-type>
<channel-type id="laundry_care_washer_less_ironing" advanced="true">
<item-type>Switch</item-type>
<label>Less Ironing</label>
<description>This status indicates whether less ironing is activated for a washer program of the home appliance.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="laundry_care_washer_pre_wash" advanced="true">
<item-type>Switch</item-type>
<label>Pre-Wash</label>
<description>This status indicates whether the pre-wash is activated for a washer program of the home appliance.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="laundry_care_washer_rinse_plus" advanced="true">
<item-type>String</item-type>
<label>Rinse Plus</label>
<description>This status defines the number of additional rinses of a washer program of the home appliance.</description>
<state readOnly="true">
<options>
<option value="LaundryCare.Washer.EnumType.RinsePlus.Off">None</option>
<option value="LaundryCare.Washer.EnumType.RinsePlus.Plus1">+1</option>
<option value="LaundryCare.Washer.EnumType.RinsePlus.Plus2">+2</option>
<option value="LaundryCare.Washer.EnumType.RinsePlus.Plus3">+3</option>
</options>
</state>
</channel-type>
<channel-type id="laundry_care_washer_soak" advanced="true">
<item-type>Switch</item-type>
<label>Soaking</label>
<description>This status indicates whether the soaking is activated for a washer program of the home appliance.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="program_energy" advanced="true">
<item-type>Number:Dimensionless</item-type>
<label>Program Energy</label>
<description>This channel provides the estimated energy required in percentage for a program of the home appliance.</description>
<state readOnly="true" min="0" max="100" pattern="%d %unit%"/>
</channel-type>
<channel-type id="program_water" advanced="true">
<item-type>Number:Dimensionless</item-type>
<label>Program Water</label>
<description>This channel provides the estimated water required in percentage for a program of the home appliance.</description>
<state readOnly="true" min="0" max="100" pattern="%d %unit%"/>
</channel-type>
<channel-type id="setpoint_temperature_refrigerator"> <channel-type id="setpoint_temperature_refrigerator">
<item-type>Number:Temperature</item-type> <item-type>Number:Temperature</item-type>
<label>Refrigerator Temperature</label> <label>Refrigerator Temperature</label>