Remove deprecated handleUpdate from ThingHandler (#8558)

The handleUpdate method was deprecated when profiles were introduced (see eclipse-archived/smarthome#4108).
Instead the "follow profile" can be used which forwards item updates as commands to handlers.
This profile works with any binding instead of only those that implement the handleUpdate method.

Related to openhab/openhab-core#1669

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2020-09-24 17:50:47 +02:00
committed by GitHub
parent 4d67ef2a6b
commit cc042dabff
16 changed files with 4 additions and 88 deletions

View File

@@ -20,7 +20,6 @@ import java.util.Map;
import java.util.Map.Entry;
import org.openhab.core.config.core.Configuration;
import org.openhab.core.library.types.DecimalType;
import org.openhab.core.library.types.OnOffType;
import org.openhab.core.library.types.PercentType;
import org.openhab.core.library.types.StopMoveType;
@@ -125,14 +124,6 @@ public class PHCHandler extends BaseThingHandler {
}
}
@Override
public void handleUpdate(ChannelUID channelUID, State newState) {
if (CHANNELS_JRM_TIME.equals(channelUID.getGroupId())) {
times[Integer
.parseInt(channelUID.getIdWithoutGroup())] = (short) (((DecimalType) newState).floatValue() * 10);
}
}
@Override
public void handleConfigurationUpdate(Map<String, Object> configurationParameters) {
if (isInitialized()) { // prevents change of address