Skip to content

Commit

Permalink
Use auto update policy 'veto' for light channels
Browse files Browse the repository at this point in the history
Resolves openhab#15983

Signed-off-by: Jacob Laursen <[email protected]>
  • Loading branch information
jlaur committed Nov 30, 2023
1 parent 4fbb6c9 commit a0df376
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,18 @@
<description>A Hue API v2 device with channels depending on its actual capabilities.</description>

<channels>
<channel id="color" typeId="system.color"/>
<channel id="color-temperature" typeId="system.color-temperature"/>
<channel id="brightness" typeId="system.brightness"/>
<channel id="switch" typeId="system.power"/>
<channel id="color" typeId="system.color">
<autoUpdatePolicy>veto</autoUpdatePolicy>
</channel>
<channel id="color-temperature" typeId="system.color-temperature">
<autoUpdatePolicy>veto</autoUpdatePolicy>
</channel>
<channel id="brightness" typeId="system.brightness">
<autoUpdatePolicy>veto</autoUpdatePolicy>
</channel>
<channel id="switch" typeId="system.power">
<autoUpdatePolicy>veto</autoUpdatePolicy>
</channel>
<channel id="alert" typeId="alert-v2">
<description>Activate the alert for the light.</description>
</channel>
Expand Down Expand Up @@ -85,20 +93,16 @@
<channel id="battery-low" typeId="system.low-battery"/>
<channel id="last-updated" typeId="last-updated-v2"/>
<channel id="dynamics" typeId="dynamics"/>
<channel id="color-temperature-abs" typeId="system.color-temperature-abs"/>
<channel id="color-xy-only" typeId="advanced-color">
<description>Set the color xy parameter of the light without changing other state parameters.</description>
</channel>
<channel id="dimming-only" typeId="advanced-brightness">
<description>Set the dimming parameter of the light without changing other state parameters.</description>
</channel>
<channel id="on-off-only" typeId="advanced-power">
<description>Set the on/off parameter of the light without changing other state parameters.</description>
<channel id="color-temperature-abs" typeId="system.color-temperature-abs">
<autoUpdatePolicy>veto</autoUpdatePolicy>
</channel>
<channel id="color-xy-only" typeId="advanced-color"/>
<channel id="dimming-only" typeId="advanced-brightness"/>
<channel id="on-off-only" typeId="advanced-power"/>
</channels>

<properties>
<property name="thingTypeVersion">1</property>
<property name="thingTypeVersion">2</property>
</properties>

<representation-property>resourceId</representation-property>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,20 +240,26 @@
<channel-type id="advanced-color" advanced="true">
<item-type>Color</item-type>
<label>Color XY Only</label>
<description>Set the color xy parameter of the light without changing other state parameters.</description>
<category>ColorLight</category>
<autoUpdatePolicy>veto</autoUpdatePolicy>
</channel-type>

<channel-type id="advanced-brightness" advanced="true">
<item-type>Dimmer</item-type>
<label>Dimming Only</label>
<description>Set the dimming parameter of the light without changing other state parameters.</description>
<category>Light</category>
<state pattern="%.1f %%"/>
<autoUpdatePolicy>veto</autoUpdatePolicy>
</channel-type>

<channel-type id="advanced-power" advanced="true">
<item-type>Switch</item-type>
<label>On/Off Only</label>
<description>Set the on/off parameter of the light without changing other state parameters.</description>
<category>Switch</category>
<autoUpdatePolicy>veto</autoUpdatePolicy>
</channel-type>

<channel-type id="security-contact">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,24 @@
</add-channel>
</instruction-set>

<instruction-set targetVersion="2">
<update-channel id="brightness">
<type>system:brightness</type>
</update-channel>
<update-channel id="color">
<type>system:color</type>
</update-channel>
<update-channel id="color-temperature">
<type>system:color-temperature</type>
</update-channel>
<update-channel id="color-temperature-abs">
<type>system:color-temperature-abs</type>
</update-channel>
<update-channel id="switch">
<type>system:power</type>
</update-channel>
</instruction-set>

</thing-type>

</update:update-descriptions>

0 comments on commit a0df376

Please sign in to comment.