[OmniLink] Simplify updating properties (#10889)

Signed-off-by: Ethan Dye <mrtops03@gmail.com>
This commit is contained in:
Ethan Dye 2021-06-20 12:26:55 -06:00 committed by GitHub
parent 080d43edd4
commit 22dd4aecd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 13 deletions

View File

@ -72,7 +72,7 @@ public enum TemperatureFormat {
public abstract int formatToOmni(float format);
/**
* Get the number which identifies this format as defined by the omniprotocol.
* Get the number which identifies this format as defined by the OmniLink protocol.
*
* @return Number which identifies this temperature format.
*/

View File

@ -14,7 +14,6 @@ package org.openhab.binding.omnilink.internal.handler;
import static org.openhab.binding.omnilink.internal.OmnilinkBindingConstants.*;
import java.util.Map;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
@ -84,9 +83,7 @@ public class AudioSourceHandler extends AbstractOmnilinkHandler {
.builder(bridgeHandler, ObjectPropertyRequests.AUDIO_SOURCE, thingID, 0).selectNamed().build();
for (AudioSourceProperties audioSourceProperties : objectPropertyRequest) {
Map<String, String> properties = editProperties();
properties.put(THING_PROPERTIES_NAME, audioSourceProperties.getName());
updateProperties(properties);
updateProperty(THING_PROPERTIES_NAME, audioSourceProperties.getName());
}
}

View File

@ -14,7 +14,6 @@ package org.openhab.binding.omnilink.internal.handler;
import static org.openhab.binding.omnilink.internal.OmnilinkBindingConstants.*;
import java.util.Map;
import java.util.Optional;
import org.eclipse.jdt.annotation.NonNullByDefault;
@ -80,9 +79,7 @@ public class AudioZoneHandler extends AbstractOmnilinkStatusHandler<ExtendedAudi
.builder(bridgeHandler, ObjectPropertyRequests.AUDIO_ZONE, thingID, 0).selectNamed().build();
for (AudioZoneProperties audioZoneProperties : objectPropertyRequest) {
Map<String, String> properties = editProperties();
properties.put(THING_PROPERTIES_NAME, audioZoneProperties.getName());
updateProperties(properties);
updateProperty(THING_PROPERTIES_NAME, audioZoneProperties.getName());
}
}

View File

@ -14,7 +14,6 @@ package org.openhab.binding.omnilink.internal.handler;
import static org.openhab.binding.omnilink.internal.OmnilinkBindingConstants.*;
import java.util.Map;
import java.util.Optional;
import org.eclipse.jdt.annotation.NonNullByDefault;
@ -75,9 +74,7 @@ public class LockHandler extends AbstractOmnilinkStatusHandler<ExtendedAccessCon
.builder(bridgeHandler, ObjectPropertyRequests.LOCK, thingID, 0).selectNamed().build();
for (AccessControlReaderProperties lockProperties : objectPropertyRequest) {
Map<String, String> properties = editProperties();
properties.put(THING_PROPERTIES_NAME, lockProperties.getName());
updateProperties(properties);
updateProperty(THING_PROPERTIES_NAME, lockProperties.getName());
}
}