eradicatore
(Justin Eltoft)
September 22, 2016, 7:20pm
11
Awesome! Thanks so much @joshua_lyon and @tgauchat !! I’ll play around and see if I can get this going maybe this weekend. Note my drivers for the garage door can be seen here:
Hi,
I’m working on a simple device handler to work with the Arduino ThingShield and things are going very well for the most part. But I’m now at the point where I need to initialize the three door state variables to the values of the three door tilt sensors (garage doors). Here is my code. I looked all around the documentation but the best I could find was setting “defaultState” to true for the state you want to be the default. But I don’t want a hard coded default. I want the app to be able just reflect the tilt sensor statuses.
http://docs.smartthings.com/en/latest/device-type-developers-guide/tiles-metadata.html#state-selection-algorithm
/**
* Copyright 2016 Justin Eltoft
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
*…
2 Likes