On the left is my button card to control my office blinds. It currently shows the default features which show open, stop, close on the first row and the percentage slider on the 2nd row. I can’t seem to get the first row buttons to work but the slider works fine. My intention here is to change the function of tapping the icon (or the button altogether) so that it toggles between 0% and 100% open state and changes the icon/color respectively, kind of like a light switch. Any suggestions on how to achieve that would be greatly appreciated!
For context on the above, I’m using this AVATTO Wifi Smart Roller Blind Motor which was imported into HA via the Tuya Integration.
On the right of the screenshot is a button card that controls a Zigbee Fingerbot that was added to HA via Zigbee2MQTT.
Currently the button works as a toggle to click (more like press and hold) my Desktop PC power button and release it after 1 sec. (Explicitly not using Wake On LAN for offline use cases)
My issue here is that the animation of the tap lights up the icon as “Powered On” and when you tap it again it “Powers off” but technically what it’s doing is triggering the finger bot again to click the power button.
I don’t expect to find a way for the button to know if my computer is actually powered on or not, so instead my intention here is to see if there is a way to change the animation to “light up” as the button is being pressed and quickly fade away/return to default after the button was pressed.
As usual, thanks in advance for all the brilliant and friendly folks out there willing to help a fellow HA enthusiast without as much technical knowledge (but hope to get there some day)!
Worth noting that I when testing, the Open and Close buttons seem to be reversed, as the Close button (on the left of the stop button) actually opens my blinds, where as the Open button (on the right of the stop button) actually doesn’t do anything. The same controls in the Smart Life app work though, and the Motor direction is correct, at least according to what’s in the app.
Again essentially if I could create a toggle here that would be 0% open and 100% open respectively, that would be enough for my purposes.
Here’s the code for the finger bot that turns on my Desktop PC:
@LiQuid_cOOled was playing around with different card types and found that there’s a type of color: disabled that effectively turns off any color animations but it can’t be added to the button card type, but it can in the tile card type.
I was playing around with it and got something that’s close to what I was thinking of:
To reiterate the original intention for this is to show a brief animation when the button is press but it to fade back to the original default color and not the yellow color that indicates it’s still turned on. I’m guessing I’d have to use a custom card like button-card to achieve this?
Also still kind of stuck on the blinds situation. To reiterate the intention of that one is to create a toggle that has:
State 1: 0% Open
State 2: 100% Open
The slider can do that now but it’s not the ideal movement/gesture I’m looking for. Just a simple button to switch between Open/Closed states.
The toggle tested to switch between 0 and 100% as expected but my only issue is that the physical state of the device are actually the opposite.
The picture shows the icon as Open when it’s actually closed IRL.
Any idea of a way to switch the states?
Thanks for that! I likely messed up the set up when setting the upper and lower limits of the blinds and did them in the opposite direction. Not a big deal as long as I can toggle between two states.
I think based on your suggestions, I’ll take a stab at custom button cards as that’s something I’m thinking of trying out anyways.
So I ended up spending a lot of time trying to redo the settings in this Tuya Smart Life WIFI Blind Motor to reconfigure the motor direction and upper and lower limits (0 and 100) but no matter what I did, the every time I re added the device via the Tuya integration the states would show the opposite of the Smart Life app. Alexa integrated with smart life correctly followed open and close instructions so I’m concluding there must’ve been something broken on the integration side as the controls to open and close also don’t work.
As mentioned, only the slider worked to properly toggle between 0 and 100 so I then dug into hour to call services to check for position states.
This is the code I ended up with which might not be the most elegant but it works for me: