Allow property value to be updated to null (#1611)

With the changes in #1598 the BaseThingHandler could no longer update property values to null.

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born 2020-08-26 12:06:53 +02:00 committed by GitHub
parent f069994ab7
commit 12a5d08691
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@
*/
package org.openhab.core.thing.binding;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
@ -509,7 +510,7 @@ public abstract class BaseThingHandler implements ThingHandler {
* @param value the value of the property
*/
protected void updateProperty(String name, String value) {
updateProperties(Map.of(name, value));
updateProperties(Collections.singletonMap(name, value));
}
/**