[wemo] Fix already configured devices in inbox (#12215)

* Reuse UDN configuration parameter definition.
* Fix inbox entries for already configured devices.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
Jacob Laursen 2022-02-06 09:50:29 +01:00 committed by GitHub
parent e9deeccf49
commit 85ffbe37db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 50 additions and 79 deletions

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<config-description:config-descriptions
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/config-description/v1.0.0
https://openhab.org/schemas/config-description-1.0.0.xsd">
<config-description uri="thing-type:wemo:device">
<parameter name="udn" type="text" required="true">
<label>Unique Device Name</label>
<description>The UDN identifies the WeMo Device</description>
</parameter>
</config-description>
</config-description:config-descriptions>

View File

@ -32,20 +32,10 @@ thing-type.config.wemo.CoffeeMaker.udn.label = Unique Device Name
thing-type.config.wemo.CoffeeMaker.udn.description = The UDN identifies the WeMo Device
thing-type.config.wemo.MZ100.deviceID.label = Device ID
thing-type.config.wemo.MZ100.deviceID.description = The device ID identifies one certain WeMo light.
thing-type.config.wemo.Maker.udn.label = Unique Device Name
thing-type.config.wemo.Maker.udn.description = The UDN identifies the WeMo Device
thing-type.config.wemo.bridge.udn.label = Unique Device Name
thing-type.config.wemo.bridge.udn.description = The UDN identifies the WeMo Link Device
thing-type.config.wemo.dimmer.udn.label = Unique Device Name
thing-type.config.wemo.dimmer.udn.description = The UDN identifies the WeMo Device
thing-type.config.wemo.insight.udn.label = Unique Device Name
thing-type.config.wemo.insight.udn.description = The UDN identifies the WeMo Device
thing-type.config.wemo.lightswitch.udn.label = Unique Device Name
thing-type.config.wemo.lightswitch.udn.description = The UDN identifies the WeMo Device
thing-type.config.wemo.motion.udn.label = Unique Device Name
thing-type.config.wemo.motion.udn.description = The UDN identifies the WeMo Device
thing-type.config.wemo.socket.udn.label = Unique Device Name
thing-type.config.wemo.socket.udn.description = The UDN identifies the WeMo Device
thing-type.config.wemo.device.udn.label = Unique Device Name
thing-type.config.wemo.device.udn.description = The UDN identifies the WeMo Device
# channel types

View File

@ -12,12 +12,9 @@
<channel id="state" typeId="state"/>
</channels>
<config-description>
<parameter name="udn" type="text" required="true">
<label>Unique Device Name</label>
<description>The UDN identifies the WeMo Device</description>
</parameter>
</config-description>
<representation-property>udn</representation-property>
<config-description-ref uri="thing-type:wemo:device"/>
</thing-type>
<thing-type id="insight">
@ -37,15 +34,11 @@
<channel id="energyTotal" typeId="energyTotal"/>
<channel id="standByLimit" typeId="standByLimit"/>
<channel id="onStandBy" typeId="onStandBy"/>
</channels>
<config-description>
<parameter name="udn" type="text" required="true">
<label>Unique Device Name</label>
<description>The UDN identifies the WeMo Device</description>
</parameter>
</config-description>
<representation-property>udn</representation-property>
<config-description-ref uri="thing-type:wemo:device"/>
</thing-type>
<thing-type id="lightswitch">
@ -56,12 +49,9 @@
<channel id="state" typeId="state"/>
</channels>
<config-description>
<parameter name="udn" type="text" required="true">
<label>Unique Device Name</label>
<description>The UDN identifies the WeMo Device</description>
</parameter>
</config-description>
<representation-property>udn</representation-property>
<config-description-ref uri="thing-type:wemo:device"/>
</thing-type>
<thing-type id="motion">
@ -73,12 +63,9 @@
<channel id="lastMotionDetected" typeId="lastMotionDetected"/>
</channels>
<config-description>
<parameter name="udn" type="text" required="true">
<label>Unique Device Name</label>
<description>The UDN identifies the WeMo Device</description>
</parameter>
</config-description>
<representation-property>udn</representation-property>
<config-description-ref uri="thing-type:wemo:device"/>
</thing-type>
<!-- Standard WeMo Bulb with E27 socket -->
@ -117,12 +104,9 @@
<channel id="sensor" typeId="sensor"/>
</channels>
<config-description>
<parameter name="udn" type="text" required="true">
<label>Unique Device Name</label>
<description>The UDN identifies the WeMo Device</description>
</parameter>
</config-description>
<representation-property>udn</representation-property>
<config-description-ref uri="thing-type:wemo:device"/>
</thing-type>
<thing-type id="CoffeeMaker">
@ -141,6 +125,8 @@
<channel id="lastCleaned" typeId="lastCleaned"/>
</channels>
<representation-property>udn</representation-property>
<config-description>
<parameter name="udn" type="text" required="true">
<label>Unique Device Name</label>
@ -148,8 +134,7 @@
</parameter>
<parameter name="pollingInterval" type="integer" required="false" min="15" max="180">
<label>Polling Interval</label>
<description>Interval polling the WeMo Coffee Maker.
</description>
<description>Interval polling the WeMo Coffee Maker.</description>
<default>60</default>
</parameter>
</config-description>
@ -170,12 +155,9 @@
<channel id="nightModeBrightness" typeId="nightModeBrightness"/>
</channels>
<config-description>
<parameter name="udn" type="text" required="true">
<label>Unique Device Name</label>
<description>The UDN identifies the WeMo Device</description>
</parameter>
</config-description>
<representation-property>udn</representation-property>
<config-description-ref uri="thing-type:wemo:device"/>
</thing-type>
<thing-type id="Crockpot">
@ -190,13 +172,9 @@
<channel id="cookedTime" typeId="cookedTime"/>
</channels>
<config-description>
<parameter name="udn" type="text">
<label>Unique Device Name</label>
<description>The UDN identifies the WeMo Device</description>
<required>true</required>
</parameter>
</config-description>
<representation-property>udn</representation-property>
<config-description-ref uri="thing-type:wemo:device"/>
</thing-type>
<thing-type id="Purifier">
@ -212,13 +190,9 @@
<channel id="filterPresent" typeId="filterPresent"/>
</channels>
<config-description>
<parameter name="udn" type="text">
<label>Unique Device Name</label>
<description>The UDN identifies the WeMo Device</description>
<required>true</required>
</parameter>
</config-description>
<representation-property>udn</representation-property>
<config-description-ref uri="thing-type:wemo:device"/>
</thing-type>
<thing-type id="Humidifier">
@ -234,13 +208,9 @@
<channel id="expiredFilterTime" typeId="expiredFilterTime"/>
</channels>
<config-description>
<parameter name="udn" type="text">
<label>Unique Device Name</label>
<description>The UDN identifies the WeMo Device</description>
<required>true</required>
</parameter>
</config-description>
<representation-property>udn</representation-property>
<config-description-ref uri="thing-type:wemo:device"/>
</thing-type>
<thing-type id="Heater">
@ -255,13 +225,9 @@
<channel id="heatingRemaining" typeId="heatingRemaining"/>
</channels>
<config-description>
<parameter name="udn" type="text">
<label>Unique Device Name</label>
<description>The UDN identifies the WeMo Device</description>
<required>true</required>
</parameter>
</config-description>
<representation-property>udn</representation-property>
<config-description-ref uri="thing-type:wemo:device"/>
</thing-type>
<channel-type id="state">