export relaybox
This commit is contained in:
16
dist/Export.js
vendored
16
dist/Export.js
vendored
@ -28,16 +28,20 @@ function HueColorLightExport(itemId, label, stateTopic, stateFeedbackTopic, brig
|
||||
return { 'homekit': HueColorLightHomekitExport(itemId, label, stateTopic, stateFeedbackTopic, brightnessTopic, brightnessFeedbackTopic, hueTopic, hueFeedbackTopic, saturationTopic, saturationFeedbackTopic, colorTemperatureTopic, colorTemperatureFeedbackTopic), 'openhab': '' };
|
||||
}
|
||||
exports.HueColorLightExport = HueColorLightExport;
|
||||
function RelayBoxExport(stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames) {
|
||||
return { 'homekit': RelayBoxHomekitExport(stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames),
|
||||
'openhab': RelayBoxOpenHABExport(stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames) };
|
||||
function RelayBoxExport(itemId, stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames) {
|
||||
return { 'homekit': RelayBoxHomekitExport(itemId, stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames),
|
||||
'openhab': RelayBoxOpenHABExport(itemId, stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames) };
|
||||
}
|
||||
exports.RelayBoxExport = RelayBoxExport;
|
||||
function RelayBoxHomekitExport(stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames) {
|
||||
function RelayBoxHomekitExport(itemId, stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames) {
|
||||
return { 'id': '', 'object': {} };
|
||||
}
|
||||
function RelayBoxOpenHABExport(stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames) {
|
||||
return '';
|
||||
function RelayBoxOpenHABExport(itemId, stateTopicPre, feedbackTopicPre, conflictTopicPre, itemNames) {
|
||||
let o = [];
|
||||
itemNames.forEach((label, index) => {
|
||||
o.push(`Switch ${itemId}${index} "${label} "{mqtt=">[localbroker:${stateTopicPre}/${index}:command:*:default],<[localbroker:${feedbackTopicPre}/${index}:state:default]"}`);
|
||||
});
|
||||
return o;
|
||||
}
|
||||
function SwitchHomekitBulbExport(id, label, setOn, statusOn) {
|
||||
let o = {
|
||||
|
Reference in New Issue
Block a user