fixes
This commit is contained in:
33
dist/Export.js
vendored
33
dist/Export.js
vendored
@ -24,6 +24,10 @@ function ContactExport(itemId, label, status) {
|
||||
return { 'homekit': ContactHomekitExport(itemId, label, status), 'openhab': '' };
|
||||
}
|
||||
exports.ContactExport = ContactExport;
|
||||
function HueColorLightExport(itemId, label, stateTopic, stateFeedbackTopic, brightnessTopic, brightnessFeedbackTopic, hueTopic, hueFeedbackTopic, saturationTopic, saturationFeedbackTopic, colorTemperatureTopic, colorTemperatureFeedbackTopic) {
|
||||
return { 'homekit': HueColorLightHomekitExport(itemId, label, stateTopic, stateFeedbackTopic, brightnessTopic, brightnessFeedbackTopic, hueTopic, hueFeedbackTopic, saturationTopic, saturationFeedbackTopic, colorTemperatureTopic, colorTemperatureFeedbackTopic), 'openhab': '' };
|
||||
}
|
||||
exports.HueColorLightExport = HueColorLightExport;
|
||||
function SwitchHomekitBulbExport(id, label, setOn, statusOn) {
|
||||
let o = {
|
||||
"id": id,
|
||||
@ -93,4 +97,33 @@ function SwitchOpenHABExport(id, label, setOn, statusOn) {
|
||||
// Switch windowLightKitchen {mqtt=">[localbroker:nodered/items/windowLightKitchen:command:*:default]", mqtt="<[localbroker:nodered/items/windowLightKitchen/feedback:state:default]"}
|
||||
return `Switch ${id} {mqtt=">[localbroker:${setOn}:command:*:default],<[localbroker:${statusOn}:state:default]"}`;
|
||||
}
|
||||
function HueColorLightHomekitExport(id, label, stateTopic, stateFeedbackTopic, brightnessTopic, brightnessFeedbackTopic, hueTopic, hueFeedbackTopic, saturationTopic, saturationFeedbackTopic, colorTemperatureTopic, colorTemperatureFeedbackTopic) {
|
||||
let o = {
|
||||
"id": id,
|
||||
"name": label,
|
||||
"service": "Lightbulb",
|
||||
"manufacturer": "hue2mqtt - Hue",
|
||||
"model": "color light",
|
||||
"topic": {
|
||||
"setOn": stateTopic,
|
||||
"statusOn": stateFeedbackTopic,
|
||||
"setBrightness": brightnessTopic,
|
||||
"statusBrightness": brightnessFeedbackTopic,
|
||||
"setHue": hueTopic,
|
||||
"statusHue": hueFeedbackTopic,
|
||||
"setSaturation": saturationTopic,
|
||||
"statusSaturation": saturationFeedbackTopic,
|
||||
"setColorTemperature": colorTemperatureTopic,
|
||||
"statusColorTemperature": colorTemperatureFeedbackTopic
|
||||
},
|
||||
"payload": {
|
||||
"onTrue": "ON",
|
||||
"onFalse": "OFF",
|
||||
"brightnessFactor": 1,
|
||||
"hueFactor": 1,
|
||||
"saturationFactor": 1
|
||||
}
|
||||
};
|
||||
return { 'id': id, 'object': o };
|
||||
}
|
||||
//# sourceMappingURL=Export.js.map
|
Reference in New Issue
Block a user