Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
* for the specific language governing permissions and limitations under the License.
*/
import groovy.json.JsonOutput
import physicalgraph.zigbee.zcl.DataType

metadata {
Expand Down Expand Up @@ -82,9 +83,20 @@ private List<Map> collectAttributes(Map descMap) {
return descMaps
}

def installed() {
log.debug "installed"
sendEvent(name: "supportedWindowShadeCommands", value: JsonOutput.toJson(["open", "close", "pause"]))
}

// Parse incoming device messages to generate events
def parse(String description) {
log.debug "description:- ${description}"

// update existing devices
if (!state.supportedWindowShadeCommands) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be if (!device.currentValue("supportedWindowShadeCommands"))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of
if (!state.supportedWindowShadeCommands) ?

sendEvent(name: "supportedWindowShadeCommands", value: JsonOutput.toJson(["open", "close", "pause"]))
}

if (description?.startsWith("read attr -")) {
Map descMap = zigbee.parseDescriptionAsMap(description)
if (isBindingTableMessage(description)) {
Expand Down