fix typo
This commit is contained in:
36
dist/Export.js
vendored
36
dist/Export.js
vendored
@ -16,6 +16,14 @@ function SwitchExport(itemId, label, stateTopic, stateFeedbackTopic, type) {
|
||||
return { 'homekit': homekitOut, 'openhab': openhabOut };
|
||||
}
|
||||
exports.SwitchExport = SwitchExport;
|
||||
function ThermostatExport(itemId, label, temperatureTopic, temperatureFeedbackTopic) {
|
||||
return { 'homekit': ThermostatHomekitExport(itemId, label, temperatureTopic, temperatureFeedbackTopic), 'openhab': '' };
|
||||
}
|
||||
exports.ThermostatExport = ThermostatExport;
|
||||
function ContactExport(itemId, label, status) {
|
||||
return { 'homekit': ContactHomekitExport(itemId, label, status), 'openhab': '' };
|
||||
}
|
||||
exports.ContactExport = ContactExport;
|
||||
function SwitchHomekitBulbExport(id, label, setOn, statusOn) {
|
||||
let o = {
|
||||
"id": id,
|
||||
@ -53,6 +61,34 @@ function SwitchHomekitOutletExport(id, label, setOn, statusOn) {
|
||||
};
|
||||
return { 'id': id, 'object': o };
|
||||
}
|
||||
function ThermostatHomekitExport(id, label, setTemperature, statusTemperature) {
|
||||
let o = {
|
||||
"id": id,
|
||||
"name": label,
|
||||
"service": "Thermostat",
|
||||
"topic": {
|
||||
"setTargetTemperature": setTemperature,
|
||||
"statusTargetTemperature": statusTemperature,
|
||||
"statusCurrentTemperature": statusTemperature
|
||||
},
|
||||
"payload": {}
|
||||
};
|
||||
return { 'id': id, 'object': o };
|
||||
}
|
||||
function ContactHomekitExport(id, label, status) {
|
||||
let o = {
|
||||
"id": id,
|
||||
"name": label,
|
||||
"service": "ContactSensor",
|
||||
"topic": {
|
||||
"statusContactSensorState": status
|
||||
},
|
||||
"payload": {
|
||||
"conContactDetected": "CLOSED"
|
||||
}
|
||||
};
|
||||
return { 'id': id, 'object': o };
|
||||
}
|
||||
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]"}`;
|
||||
|
Reference in New Issue
Block a user