]> git.basschouten.com Git - openhab-addons.git/commitdiff
[sleepiq] Add thing type update instructions (#14460)
authorMark Hilbush <mark@hilbush.com>
Tue, 7 Mar 2023 22:13:18 +0000 (17:13 -0500)
committerGitHub <noreply@github.com>
Tue, 7 Mar 2023 22:13:18 +0000 (23:13 +0100)
* Add thing type update instructions
* Move thingTypeVersion to correct thing type
* Add groupIds to update instructions

Signed-off-by: Mark Hilbush <mark@hilbush.com>
bundles/org.openhab.binding.sleepiq/src/main/resources/OH-INF/thing/thing-types.xml
bundles/org.openhab.binding.sleepiq/src/main/resources/OH-INF/update/instructions.xml [new file with mode: 0644]

index 0c8c60a388b63cda04ca590d4609f4c67a2af874..9942604ea28206db91c4305dd59772e94f3f54b0 100644 (file)
                        <channel-group id="right" typeId="chamberGroupType"/>
                </channel-groups>
 
+               <properties>
+                       <property name="thingTypeVersion">1</property>
+               </properties>
+
                <config-description>
                        <parameter name="bedId" type="text" required="true">
                                <label>Bed ID</label>
diff --git a/bundles/org.openhab.binding.sleepiq/src/main/resources/OH-INF/update/instructions.xml b/bundles/org.openhab.binding.sleepiq/src/main/resources/OH-INF/update/instructions.xml
new file mode 100644 (file)
index 0000000..5388b92
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<update:update-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:update="https://openhab.org/schemas/update-description/v1.0.0"
+       xsi:schemaLocation="https://openhab.org/schemas/update-description/v1.0.0 https://openhab.org/schemas/update-description-1.0.0.xsd">
+
+       <thing-type uid="sleepiq:dualBed">
+
+               <instruction-set targetVersion="1">
+                       <add-channel id="todaySleepInBedSeconds" groupIds="left,right">
+                               <type>sleepiq:todaySleepInBedSecondsType</type>
+                       </add-channel>
+                       <add-channel id="todaySleepOutOfBedSeconds" groupIds="left,right">
+                               <type>sleepiq:todaySleepOutOfBedSecondsType</type>
+                       </add-channel>
+                       <add-channel id="todaySleepRestfulSeconds" groupIds="left,right">
+                               <type>sleepiq:todaySleepRestfulSecondsType</type>
+                       </add-channel>
+                       <add-channel id="todaySleepRestlessSeconds" groupIds="left,right">
+                               <type>sleepiq:todaySleepRestlessSecondsType</type>
+                       </add-channel>
+               </instruction-set>
+
+       </thing-type>
+
+</update:update-descriptions>