Consolidate properties for compliance. (#11992)
Fixes #11991 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
parent
82974b4c2f
commit
e64d0e5028
|
@ -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";
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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">
|
||||||
|
|
Loading…
Reference in New Issue