tgsoverly / smart-things

Custom device type handlers for the SmartThings platform
MIT License
3 stars 2 forks source link

10 speed fan as well as Max value #9

Open hollapm opened 5 years ago

hollapm commented 5 years ago

I was playing with the code and noticed it only goes to 7. Many of the newer fans go to 10. I updated your code with:

    multiAttributeTile(name:"controlPanel", type:"generic", width:6, height:4) {
        tileAttribute("device.level", key: "PRIMARY_CONTROL") {
            attributeState "default", label:'${currentValue}', backgroundColors:[
                [value: 0, color: "#444444"],
                [value: 1, color: "#444466"],
                [value: 2, color: "#444477"],
                [value: 3, color: "#444488"],
                [value: 4, color: "#444499"],
                [value: 5, color: "#4444aa"],
                [value: 6, color: "#4444bb"],
                [value: 7, color: "#4444cc"],
                [value: 8, color: "#4444dd"],
                [value: 9, color: "#4444ee"],
                [value: 10, color: "#4444ff"]
            ]

Also for the Max button to work, I believe there is an error in the code.

while(notToLevel){ commands.add getSendCodeAction(code)

I believe it should be while(notToLevel){ commands.add getSendCodeAction(1)

For the timer not working, I am still playing with this. I believe the issue is that its listed in SECONDARY_CONTROL which only displays text and is not a hot-link (hence doesn't do anything).

I'm not sure how to fix this (I'm a novice), and am also running Android Q (beta) and have to use the new smart-things app vs classic.

Note in the new smartthings app, it displays a dimmer and the value goes to 100, it should go in increments of 10 vs 1. (If I have the fan at 8, the dimmer is set to 8, if the fan is at 3, the dimmer is at 3) . Note that I have not figured out how to change the dimmer as it gives me an error when I do try to change it. If I go to the original app and change the speed, this is how I am able to see the dimmer setting change.

I would love to help out, ;-)