mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
[magic] Added a trigger channel for easier tests (#1853)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
+1
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user