[magic] Added a trigger channel for easier tests (#1853)

Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
Kai Kreuzer
2020-11-27 15:02:04 +01:00
committed by GitHub
parent f6d3f1d560
commit 9e89a4dbda
3 changed files with 13 additions and 0 deletions
@@ -34,6 +34,7 @@ public class MagicOnOffLightHandler extends BaseThingHandler {
@Override
public void handleCommand(ChannelUID channelUID, Command command) {
triggerChannel("trigger", command.toString());
}
@Override
@@ -141,4 +141,15 @@
<label>Image</label>
</channel-type>
<channel-type id="trigger">
<kind>trigger</kind>
<label>Trigger</label>
<event>
<options>
<option value="ON">Switched on</option>
<option value="OFF">Switched off</option>
</options>
</event>
</channel-type>
</thing:thing-descriptions>
@@ -17,6 +17,7 @@
<channels>
<channel id="switch" typeId="switch"/>
<channel id="trigger" typeId="trigger"/>
</channels>
<config-description>