mirror of
https://github.com/danieldemus/openhab-addons
synced 2026-07-29 12:34:21 +02:00
[tuya] Add missing "bitmap" DS type (#20428)
Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk>
This commit is contained in:
+9
@@ -262,6 +262,15 @@ public class TuyaChannelTypeProvider implements ChannelTypeProvider {
|
||||
configurationRef = "channel-type:tuya:dimmer";
|
||||
tags.add(schemaDp.readOnly ? "Status" : "Control");
|
||||
tags.add("Brightness");
|
||||
} else if ("bitmap".equals(schemaDp.type)) {
|
||||
acceptedItemType = NUMBER;
|
||||
category = "";
|
||||
configurationRef = "channel-type:tuya:bitmap";
|
||||
tags.add(schemaDp.readOnly ? "Status" : "Control");
|
||||
|
||||
stateDescriptionFragmentBuilder = StateDescriptionFragmentBuilder.create() //
|
||||
.withReadOnly(schemaDp.readOnly) //
|
||||
.withPattern("%x");
|
||||
} else if ("bool".equals(schemaDp.type)) {
|
||||
acceptedItemType = SWITCH;
|
||||
category = "switch";
|
||||
|
||||
@@ -41,6 +41,18 @@
|
||||
</parameter>
|
||||
</config-description>
|
||||
|
||||
<config-description uri="channel-type:tuya:bitmap">
|
||||
<parameter name="dp" type="integer" required="true">
|
||||
<label>DP</label>
|
||||
</parameter>
|
||||
<parameter name="sendAsString" type="boolean">
|
||||
<label>Send As String</label>
|
||||
<description>Send the value as string instead of number.</description>
|
||||
<default>false</default>
|
||||
<advanced>true</advanced>
|
||||
</parameter>
|
||||
</config-description>
|
||||
|
||||
<config-description uri="channel-type:tuya:number">
|
||||
<parameter name="dp" type="integer" required="true">
|
||||
<label>DP</label>
|
||||
|
||||
Reference in New Issue
Block a user