Consolidate properties for compliance. (#11992)

Fixes #11991

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
Jacob Laursen 2022-01-08 01:00:22 +01:00 committed by GitHub
parent 82974b4c2f
commit e64d0e5028
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 10 deletions

View File

@ -35,8 +35,4 @@ public class DanfossAirUnitBindingConstants {
// The thing type as a set // The thing type as a set
public static Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections.singleton(THING_TYPE_AIRUNIT); public static Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections.singleton(THING_TYPE_AIRUNIT);
// Properties
public static String PROPERTY_UNIT_NAME = "Unit Name";
public static String PROPERTY_SERIAL = "Serial Number";
} }

View File

@ -12,8 +12,6 @@
*/ */
package org.openhab.binding.danfossairunit.internal.handler; package org.openhab.binding.danfossairunit.internal.handler;
import static org.openhab.binding.danfossairunit.internal.DanfossAirUnitBindingConstants.*;
import java.io.IOException; import java.io.IOException;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.UnknownHostException; import java.net.UnknownHostException;
@ -184,8 +182,8 @@ public class DanfossAirUnitHandler extends BaseThingHandler {
try { try {
Map<String, String> properties = new HashMap<>(2); Map<String, String> properties = new HashMap<>(2);
properties.put(PROPERTY_UNIT_NAME, localAirUnit.getUnitName()); properties.put(Thing.PROPERTY_MODEL_ID, localAirUnit.getUnitName());
properties.put(PROPERTY_SERIAL, localAirUnit.getUnitSerialNumber()); properties.put(Thing.PROPERTY_SERIAL_NUMBER, localAirUnit.getUnitSerialNumber());
updateProperties(properties); updateProperties(properties);
propertiesInitializedSuccessfully = true; propertiesInitializedSuccessfully = true;
updateStatus(ThingStatus.ONLINE); updateStatus(ThingStatus.ONLINE);

View File

@ -17,8 +17,7 @@
<channel-group id="service" typeId="service"/> <channel-group id="service" typeId="service"/>
</channel-groups> </channel-groups>
<properties> <properties>
<property name="Unit Name">unknown</property> <property name="vendor">Danfoss</property>
<property name="Serial Number">unknown</property>
</properties> </properties>
<config-description> <config-description>
<parameter name="host" type="text" required="true"> <parameter name="host" type="text" required="true">