[OmniLink] Simplify updating properties (#10889)
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
This commit is contained in:
parent
080d43edd4
commit
22dd4aecd8
@ -72,7 +72,7 @@ public enum TemperatureFormat {
|
|||||||
public abstract int formatToOmni(float format);
|
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.
|
* @return Number which identifies this temperature format.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -14,7 +14,6 @@ package org.openhab.binding.omnilink.internal.handler;
|
|||||||
|
|
||||||
import static org.openhab.binding.omnilink.internal.OmnilinkBindingConstants.*;
|
import static org.openhab.binding.omnilink.internal.OmnilinkBindingConstants.*;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@ -84,9 +83,7 @@ public class AudioSourceHandler extends AbstractOmnilinkHandler {
|
|||||||
.builder(bridgeHandler, ObjectPropertyRequests.AUDIO_SOURCE, thingID, 0).selectNamed().build();
|
.builder(bridgeHandler, ObjectPropertyRequests.AUDIO_SOURCE, thingID, 0).selectNamed().build();
|
||||||
|
|
||||||
for (AudioSourceProperties audioSourceProperties : objectPropertyRequest) {
|
for (AudioSourceProperties audioSourceProperties : objectPropertyRequest) {
|
||||||
Map<String, String> properties = editProperties();
|
updateProperty(THING_PROPERTIES_NAME, audioSourceProperties.getName());
|
||||||
properties.put(THING_PROPERTIES_NAME, audioSourceProperties.getName());
|
|
||||||
updateProperties(properties);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,6 @@ package org.openhab.binding.omnilink.internal.handler;
|
|||||||
|
|
||||||
import static org.openhab.binding.omnilink.internal.OmnilinkBindingConstants.*;
|
import static org.openhab.binding.omnilink.internal.OmnilinkBindingConstants.*;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
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();
|
.builder(bridgeHandler, ObjectPropertyRequests.AUDIO_ZONE, thingID, 0).selectNamed().build();
|
||||||
|
|
||||||
for (AudioZoneProperties audioZoneProperties : objectPropertyRequest) {
|
for (AudioZoneProperties audioZoneProperties : objectPropertyRequest) {
|
||||||
Map<String, String> properties = editProperties();
|
updateProperty(THING_PROPERTIES_NAME, audioZoneProperties.getName());
|
||||||
properties.put(THING_PROPERTIES_NAME, audioZoneProperties.getName());
|
|
||||||
updateProperties(properties);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,6 @@ package org.openhab.binding.omnilink.internal.handler;
|
|||||||
|
|
||||||
import static org.openhab.binding.omnilink.internal.OmnilinkBindingConstants.*;
|
import static org.openhab.binding.omnilink.internal.OmnilinkBindingConstants.*;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||||
@ -75,9 +74,7 @@ public class LockHandler extends AbstractOmnilinkStatusHandler<ExtendedAccessCon
|
|||||||
.builder(bridgeHandler, ObjectPropertyRequests.LOCK, thingID, 0).selectNamed().build();
|
.builder(bridgeHandler, ObjectPropertyRequests.LOCK, thingID, 0).selectNamed().build();
|
||||||
|
|
||||||
for (AccessControlReaderProperties lockProperties : objectPropertyRequest) {
|
for (AccessControlReaderProperties lockProperties : objectPropertyRequest) {
|
||||||
Map<String, String> properties = editProperties();
|
updateProperty(THING_PROPERTIES_NAME, lockProperties.getName());
|
||||||
properties.put(THING_PROPERTIES_NAME, lockProperties.getName());
|
|
||||||
updateProperties(properties);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user