How to trigger a button Click method

Hi… been racking my brains on this one and the fog won’t clear…

I have some complex layouts with lots of buttons that do lots of things on the page. All works well. I now want to use an external data source to fire off one of the buttons… as if the button has been manually clicked.

The actual use case is about changing to a Audio or a Video Page and I now want to be able to change that page when something outside of THR turns the Amp into a given state.

I know I can use a data action on all of the different objects on the page, but honestly there are a gazillion of them and maintenance would be a nightmare… far better if I can use a data variable to fire a button click using a script or something that can call the button method.

Is that possible ?
thanks

I’m flying blind, but off the top of my head I might offer two solutions to explore:

  1. Use grids with the controls, and change the properties of the grids instead (similar to what one would do change views based on orientation).

  2. Have multiple pages and use script actions to call the corresponding page. While scripts have been discouraged for a while, they are still there and in some cases, can be easier to work with.

For me, I have visual feedback for my amp based on the power, sound mode and input selected. I first used to poll with THR, but then I moved to using MQTT and Node Red (the latter would poll the devices for state and update the MQTT topics accordingly, vs bogging my tablet down).

HTH (somewhat)