Haspmota Button .hidden attribute help #23773
-
My need is similar to this post https://github.com/arendst/Tasmota/discussions/16297 My display and code works. Now trying to add .hidden attribute to a button as I want to make the button disappear if certain condition is true. I have this code in :"autoexec.be" for my trigger condition: Then in my "pages.jsonl"file is have this: My goal is to hide the button anytime global.xyzenable is equal to "RUNNING". |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
To me, your issue does not look to be about "hidden", but about the weird things you are doing. On a detailed level, your first part (code in Next, it just does not work using a variable name as trigger in Maybe something like BTW. You could likely make this a bit simpler: |
Beta Was this translation helpful? Give feedback.
To me, your issue does not look to be about "hidden", but about the weird things you are doing. On a detailed level, your first part (code in
autoexec.be
) has two unbalanced single quote making syntax invalid, hence it is not clear what yourautoexec.be
actually is.Next, it just does not work using a variable name as trigger in
tasmota.add_rule
. What you can do is to get rid of thatberry_run
part, and instead assignglobal.p1b104.hidden
more directly without that detour around a "rule" to set it. Assuming that what you posted is only two lines from your longerautoexec.be
, that could be a place to do that assignment directly without thatglobal.xyzenable
.Maybe something like
global.p1b…