When the binary sensor is enabled, the test switch is enabled, but it does not include the entity that is inside (input_boolean.test1). Only if you manually turn on the test switch, only then does the entity itself turn on. How to make an entity (input_boolean.test1) turn on from a binary sensor (bin_sensor_test1) inside a switch (switch_test1)?
This switch is the main faucet that opens the water. Under the binary sensor, other valves are hidden, which are installed after the main valve. Thus, I wanted to make the main faucet open if any of the subsequent faucets are open. I wanted to do this in a switch, because I think it’s easier than creating an entire automation.
The only way to turn a Template Switch on or off is by either using the Lovelace UI or by calling the switch.turn_on or switch.turn_off services.
You’re trying to use the Template Switch’s value_template to control its turn_on and turn_off options and that’s not possible; it’s not how those options are designed to work.
I’ve had this conversation with at least two other users who have made the same mistake. They misunderstood the behavior of a Template Switch.
The switches value_template determines the switches state in the UI.
in your example if the binary_sensor is on the switch will display as on.
But the binary_sensor has nothing to do with the actions that the switch is supposed to take.
As mentioned you can only take the switch actions thru the UI or thru the switch services.
you could technically use the state of the input_boolean as the state of the switch but then it would be completely redundant since you could just use the input_boolean directly instead