The code below is pdloveâs âhomebridge-smartthingsâ code.
As you can see in the code below,
Both the Homekit and the Smartthings receive status only at the level value.
If the curtain can be adjusted to the level value in the ST, it can be adjusted in the homoket.
if (device.capabilities["Switch Level"] !== undefined) {
if (device.commands.levelOpenClose) {
//This is a Window Shade
this.deviceGroup = "shades"
thisCharacteristic = this.getaddService(Service.WindowCovering).getCharacteristic(Characteristic.TargetPosition)
thisCharacteristic.on('get', function(callback) { callback(null, parseInt(that.device.attributes.level)); });
thisCharacteristic.on('set', function(value, callback) { that.platform.api.runCommand(callback, that.deviceid, "setLevel", { value1: value }); });
that.platform.addAttributeUsage("level", this.deviceid, thisCharacteristic);
thisCharacteristic = this.getaddService(Service.WindowCovering).getCharacteristic(Characteristic.CurrentPosition)
thisCharacteristic.on('get', function(callback) { callback(null, parseInt(that.device.attributes.level)); });
that.platform.addAttributeUsage("level", this.deviceid, thisCharacteristic);
}