HaDevice "Commands" variable usable for showing state changes?

I would like to disable some controls in my device’s dashboard depending on state changes, and see that HaDevice has a Commands variable that, if it exists, will hold a list of control names on the dashboard, and missing names will disable or hide those controls. I’ve implemented it, but it does not seem to enable/disable or hide/unhide when expected. So is it known if this way of changing the UI is usable, or what alternatives might exist?

Thanks a lot,
watou