I've got Top Down Bottom Up Shades. They are paired to Hubitat through a Bond Bridge.
Neither Hubitat or Bond have a driver for TDBU, so I just paired the top and bottom bars as separate shades. This works great EXCEPT that is shows everything opposite for the top bar, and in my house, the shade position is changed almost entirely by moving the top bar. When I want to close it I have to select open and vice versa, and the dashboard icons are always wrong. After 2 years of this, I need to fix it.
To be clear, in my case, because the bottom bar never moves, when the top bar is down, the shade is open, when the top bar is up, the shade is closed
I'm using the Bond Motorized shade driver. The driver commands include a "Fix Shade" command that I can toggle beteen open & closed, as well as a "Start Position Change" command that has a dropdown from which I can select "open" & "closed". Doing either or both properly revises both the shade status and the dashboard icon to match the shade position, but it only holds for one or two position changes, then it reverts back to showing the opposite of what it is.
Next I attempted to revise the driver, but I have no idea what I'm doing, so I need some help from the smart people here.
Thus I've pasted the entire driver below (hope that is allowed). I tried switching the data after 'def open() from {parent.handleOpen(device)} to {parent.handleClosed(device)} and vice versa for def close(), but the only thing that changed with that is the command to send from the automation, The shade dashboard icons and the shade status in device is still backwards.
Is there a way to fix this either in the driver commands or by modifying the driver, and if so, please help me understand...
Original HE Driver:
/**
- BOND Motorized Shade
- Copyright 2019-2020 Dominick Meglio
*/
metadata {
definition (
name: "BOND Motorized Shade",
namespace: "bond",
author: "dmeglio@gmail.com",
importUrl: "https://raw.githubusercontent.com/dcmeglio/hubitat-bond/master/drivers/BOND_Motorized_Shade.groovy"
) {
capability "WindowShade"
capability "Switch"
command "stop"
command "fixShade", [[name:"Shade*", type: "ENUM", description: "Shade", constraints: ["open","close"] ] ]
command "toggle"
}
}
def open() {
parent.handleOpen(device)
}
def close() {
parent.handleClose(device)
}
def on() {
open()
}
def off() {
close()
}
def toggle() {
if (device.currentValue("windowShade") == "open")
close()
else
open()
}
def stop() {
parent.handleStop(device)
}
def fixShade(shade) {
parent.fixShadeState(device, shade)
}
def setPosition(Number position) {
if (position == 0) {
log.info "position special value 0 is set, trigger CLose command"
close()
} else if (position == 50) {
log.info "position special value 50 is set, triggering Preset command"
parent.handlePreset(device)
} else if (position == 100) {
log.info "position special value 100 is set, triggering Open command"
open()
} else {
log.info "no-op for position value " + position + ", set position to 50 to trigger Preset command"
}
}