I have been creating a bunch of automations with the insanely capable Room Lighting App and I've been able to work through just about any issue I've encountered. However, today I tried to create one for my blinds and I'm running into a situation where it is not capturing the position or letting me manually edit it. Any thoughts would be very much appreciated!
Could you show a screenshot of the Current States from the device page of Office Blinds.
What driver is this?
It should have position attribute, and would need that to be used as a shade per se in Room Lighting.
Neo Smart Controller
Is this a user driver? If so, please post a link to the source code for it. Also, could you post a screenshot of the device page, the whole thing with the commands? Like this:
I'm not sure where I got it as I set it up months ago but looking in my drivers, it looks like it must be. The namespace is listed as brianwilson-hubitat. Maybe I should look into whether or not it has been updated. It's been so long I assumed it might have just been built in.
Do a setPosition on it. That's how Room Lights wants to control it. Once it has the position attribute populated, RL will grab it and then you should be able to edit the position and control it. Don't use level even though it works.
I actually thought of that and tried that. All it does is change the level to the value I input into set position.
Without creating a position attribute value?
OK, you will need to change the driver. If you find the method called setPosition(value), you will find that it calls setLevel(value). You need to copy the code in setLevel, and put it into setPosition() instead of what's there. On the line of code that has sendEvent(name: "level", ...) change that to sendEvent(name: "position", ... Do this in the code you put into setPosition.
Or you could just change "level" in sendEvent in setLevel() to "position".
You could just post the source code for setLevel() and setPosition() here, and I can edit it for you,
Interestingly enough I didn't find anywhere in setPosition where it was doing the sendEvent but I found it in an updateStatus method for level, so I just copied that line and also did a sendEvent for position and bingo! Thanks so much for the assist!
This was the source code in case you're interested. I couldn't figure out how setPosition was updating level as I didn't see updateStatus in that method either... but this is not my skillset.
It should work now in Room Lights.
It does! However, I have an additional follow on issue. Now that I’ve added the blind to a room light automation. The activation device it creates only has blinds controls. No more on off controls for example.
You can change the driver for the Activator Device to Room Lights Activator, and get on/off as well as position/level.