export stuff
This commit is contained in:
@ -132,16 +132,16 @@ function ContactHomekitExport(id: string, label: string, status: string) : Homek
|
||||
|
||||
function SwitchOpenHABExport(id: string, label: string, setOn: string, statusOn: string): string {
|
||||
// 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]"}`
|
||||
return `Switch ${id} "${label}"{mqtt=">[localbroker:${setOn}:command:*:default],<[localbroker:${statusOn}:state:default]"}`
|
||||
}
|
||||
|
||||
function ContactOpenHABExport(id: string, label: string, status: string): string {
|
||||
// Switch windowLightKitchen {mqtt=">[localbroker:nodered/items/windowLightKitchen:command:*:default]", mqtt="<[localbroker:nodered/items/windowLightKitchen/feedback:state:default]"}
|
||||
return `Switch ${id} {mqtt="<[localbroker:${status}:state:default]"}`
|
||||
return `Contact ${id} "${label}" {mqtt="<[localbroker:${status}:state:default]"}`
|
||||
}
|
||||
|
||||
function ThermostatOpenHAPExport(id: string, label: string, setTemperature: string, statusTemperature: string) : string {
|
||||
return `Number ${id} {mqtt=">[localbroker:${setTemperature}:command:*:default],<[localbroker:${statusTemperature}:state:default]"}`
|
||||
return `Number ${id} "${label}" {mqtt=">[localbroker:${setTemperature}:command:*:default],<[localbroker:${statusTemperature}:state:default]"}`
|
||||
}
|
||||
|
||||
function HueColorLightHomekitExport(id: string, label: string,
|
||||
@ -177,4 +177,4 @@ function HueColorLightHomekitExport(id: string, label: string,
|
||||
}
|
||||
}
|
||||
return { 'id': id, 'object': o}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user