| 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_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_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_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_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 |
| 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 |
public static final String CHANNEL_DURATION = "duration";
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_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_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_SUPER_MODE = "super_mode_refrigerator";
public static final String CHANNEL_FREEZER_SETPOINT_TEMPERATURE = "setpoint_temperature_freezer";
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_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_HOOD_VENTING_LEVEL = "Cooking.Common.Option.Hood.VentingLevel";
public static final String OPTION_HOOD_INTENSIVE_LEVEL = "Cooking.Common.Option.Hood.IntensiveLevel";
*/
protected abstract void configureEventHandlers(final Map<String, EventHandler> handlers);
+ protected boolean isChannelLinkedToProgramOptionNotFullySupportedByApi() {
+ return false;
+ }
+
/**
* Update all channels via API.
*
getThingChannel(CHANNEL_OPERATION_STATE).ifPresent(channel -> updateState(channel.getUID(),
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)
.ifPresent(c -> updateState(c.getUID(), new QuantityType<>(100, PERCENT)));
getThingChannel(CHANNEL_REMAINING_PROGRAM_TIME_STATE)
.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)
.ifPresent(c -> updateState(c.getUID(), new QuantityType<>(0, PERCENT)));
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);
}
};
String value = event.getValue();
getThingChannel(CHANNEL_ACTIVE_PROGRAM_STATE).ifPresent(channel -> updateState(channel.getUID(),
value == null ? UnDefType.UNDEF : new StringType(mapStringType(value))));
- if (event.getValue() == null) {
+ if (value == null) {
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) {
return event -> getThingChannel(channelId).ifPresent(channel -> updateState(channel.getUID(),
OnOffType.from(!STATE_EVENT_PRESENT_STATE_OFF.equals(event.getValue()))));
return event -> {
defaultBooleanEventHandler(CHANNEL_REMOTE_CONTROL_ACTIVE_STATE).handle(event);
- // update available program options if update was previously delayed and remote control is enabled
try {
- String programKey = programOptionsDelayedUpdate;
- if (programKey != null && Boolean.parseBoolean(event.getValue())) {
- logger.debug("Delayed update of options for program {}", programKey);
- updateProgramOptionsStateDescriptions(programKey);
- programOptionsDelayedUpdate = null;
+ if (Boolean.parseBoolean(event.getValue())) {
+ // update available program options if update was previously delayed and remote control is enabled
+ String programKey = programOptionsDelayedUpdate;
+ if (programKey != 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) {
logger.debug("Could not update program options. {}", e.getMessage());
return event -> {
defaultSelectedProgramStateEventHandler().handle(event);
- // update available program options
try {
Optional<HomeConnectApiClient> apiClient = getApiClient();
String programKey = event.getValue();
+
if (apiClient.isPresent() && programKey != null) {
- // Delay the update if options are not yet cached and remote control is disabled
- if (availableProgramOptionsCache.get(programKey) == null
- && !apiClient.get().isRemoteControlActive(getThingHaId())) {
+ Boolean remoteControl = (availableProgramOptionsCache.get(programKey) == null
+ || isChannelLinkedToProgramOptionNotFullySupportedByApi())
+ ? 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);
programOptionsDelayedUpdate = programKey;
} else {
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) {
logger.debug("Could not update program options. {}", e.getMessage());
.ifPresent(channel -> updateState(channel.getUID(), new StringType(option.getValue())));
break;
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())));
break;
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())));
break;
case OPTION_DRYER_DRYING_TARGET:
.ifPresent(channel -> updateState(channel.getUID(),
new QuantityType<>(option.getValueAsInt(), PERCENT)));
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;
}
}
});
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_TEMPERATURE,
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
handlers.put(CHANNEL_DRYER_DRYING_TARGET,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(EVENT_REMAINING_PROGRAM_TIME, defaultRemainingProgramTimeEventHandler());
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_ACTIVE_PROGRAM, defaultActiveProgramEventHandler());
+ handlers.put(EVENT_ACTIVE_PROGRAM, updateProgramOptionsAndActiveProgramStateEventHandler());
handlers.put(EVENT_OPERATION_STATE, defaultOperationStateEventHandler());
handlers.put(EVENT_SELECTED_PROGRAM, updateProgramOptionsAndSelectedProgramStateEventHandler());
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
protected void handleCommand(final ChannelUID channelUID, final Command command,
final HomeConnectApiClient apiClient)
if (offline) {
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_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));
}
}
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_TEMPERATURE,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
+ handlers.put(CHANNEL_WASHER_IDOS1_LEVEL,
+ getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
+ handlers.put(CHANNEL_WASHER_IDOS2_LEVEL,
+ getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_IDOS1,
getAndUpdateProgramOptionsStateDescriptionsAndSelectedProgramStateUpdateHandler());
handlers.put(CHANNEL_WASHER_IDOS2,
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
handlers.put(EVENT_REMAINING_PROGRAM_TIME, defaultRemainingProgramTimeEventHandler());
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_ACTIVE_PROGRAM, defaultActiveProgramEventHandler());
+ handlers.put(EVENT_ACTIVE_PROGRAM, updateProgramOptionsAndActiveProgramStateEventHandler());
handlers.put(EVENT_OPERATION_STATE, defaultOperationStateEventHandler());
handlers.put(EVENT_SELECTED_PROGRAM, updateProgramOptionsAndSelectedProgramStateEventHandler());
event -> getThingChannel(CHANNEL_WASHER_SPIN_SPEED).ifPresent(channel -> updateState(channel.getUID(),
event.getValue() == null ? UnDefType.UNDEF : new StringType(event.getValue()))));
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()))));
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()))));
}
+ @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
protected void handleCommand(final ChannelUID channelUID, final Command command,
final HomeConnectApiClient apiClient)
apiClient.setProgramOptions(getThingHaId(), OPTION_WASHER_SPIN_SPEED, command.toFullString(), null,
false, false);
break;
- case CHANNEL_WASHER_IDOS1:
+ case CHANNEL_WASHER_IDOS1_LEVEL:
apiClient.setProgramOptions(getThingHaId(), OPTION_WASHER_IDOS_1_DOSING_LEVEL,
command.toFullString(), null, false, false);
break;
- case CHANNEL_WASHER_IDOS2:
+ case CHANNEL_WASHER_IDOS2_LEVEL:
apiClient.setProgramOptions(getThingHaId(), OPTION_WASHER_IDOS_2_DOSING_LEVEL,
command.toFullString(), null, false, false);
break;
if (offline) {
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_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_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));
}
}
}
<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_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_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="remaining_program_time_state" typeId="remaining_program_time_state"/>
<channel id="program_progress_state" typeId="program_progress_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_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="basic_actions_state" typeId="basic_actions_state"/>
<channel id="remaining_program_time_state" typeId="remaining_program_time_state"/>
</state>
<autoUpdatePolicy>veto</autoUpdatePolicy>
</channel-type>
- <channel-type id="laundry_care_washer_idos1">
+ <channel-type id="laundry_care_washer_idos1_level">
<item-type>String</item-type>
<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
</state>
<autoUpdatePolicy>veto</autoUpdatePolicy>
</channel-type>
- <channel-type id="laundry_care_washer_idos2">
+ <channel-type id="laundry_care_washer_idos2_level">
<item-type>String</item-type>
<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
</state>
<autoUpdatePolicy>veto</autoUpdatePolicy>
</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">
<item-type>Number:Temperature</item-type>
<label>Refrigerator Temperature</label>