forked from openhab/openhab-addons
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mqtt.generic] add trigger channel type (openhab#6902)
* add possibility to make generic string/number channels triggers * witespace * make trigger an own channel type * improve description * good point * review Signed-off-by: Jochen Klein <git@jochen.susca.de>
- Loading branch information
Showing
5 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...openhab.binding.mqtt.generic/src/main/resources/ESH-INF/config/trigger-channel-config.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<config-description:config-descriptions | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0" | ||
xsi:schemaLocation="https://openhab.org/schemas/config-description/v1.0.0 https://openhab.org/schemas/config-description-1.0.0.xsd"> | ||
|
||
<config-description uri="thing-type:mqtt:trigger_channel"> | ||
<parameter-group name="transformations"> | ||
<label>Transform Values</label> | ||
<description>These configuration parameters allow you to alter before a received value is used in the trigger.</description> | ||
<advanced>true</advanced> | ||
</parameter-group> | ||
|
||
<parameter name="stateTopic" type="text" required="true"> | ||
<label>MQTT Trigger Topic</label> | ||
<description>An MQTT topic that this thing will subscribe to, to receive the trigger</description> | ||
</parameter> | ||
<parameter name="transformationPattern" type="text" groupName="transformations"> | ||
<label>Incoming Value Transformations</label> | ||
<description><![CDATA[ | ||
Applies transformations to an incoming MQTT topic value. | ||
This can be used to map the events sent by the device to common values for all devices using, | ||
e.g. the MAP transformation. | ||
You can chain transformations by separating them with the intersection character ∩. | ||
]]></description> | ||
<advanced>true</advanced> | ||
</parameter> | ||
</config-description> | ||
</config-description:config-descriptions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters