Do you just want a toggle that is on or off based on the other states? If so you can make a binary_sensor that does the same thing without an automation
binary_sensor:
- platform: template
luci_mensola:
value_template: >
{{ is_state('input_boolean.luci_mensola', 'off') and is_state('input_boolean.luci_centrali', 'off') and is_state('input_boolean.coppa_vapore', 'off' ) and is_state('input_boolean.luci_led_cucina', 'off' ) }}
@petro ,
Looking at both the original and your response, there seems to be nothing wrong with either. They should work.
In effect what you did was create a ‘group’ - of items and the binary sensor is the group switch, except you can’t use the binary_sensor to switch them off.
My question is why doesn’t the original work ?