Hello, I would like to control two entities manualy with only one toggle in the UI. One entity is the heater and the other is a pump (both are switches). The heating element must not run without a pump. So I want to control both together via oine toggle. It serves to heat up the pool. Unfortunately, I am still a beginner and need help. How can I do that?
To make this bullet proof I think Iâd go with : -
â{{ is_state(âswitch.switch_oneâ, âonâ) or is_state(âswitch.switch_twoâ, âonâ) }}â
That way either switch will do the business
Edit: Maybe not, Iâm not sure how youâd switch this off as it seems a bit ambiguous, can you explain its operation Francis ?
On balance, Iâm favouring VDRainerâs nice and simple solution.
You have to state the domain, so put
switch:
Directly above your ânewâ switch (where your cursor is shown)
Other new switches would go under the same heading (ie you donât need multiple headers)
You should not post images to display text (size issues) use the </> button to insert preformatted text.
Actually to be super flexible you could extend @VDRainer 's solution so that switching either switch on, brings on the other and switching either switch off, switches both off : -
- alias: two switches with either the master
trigger:
- platform: state
entity_id: switch.one
- platform: state
entity_id: switch.two
action:
- service_template: switch.turn_{{trigger.to_state.state}}
entity_id: switch.one, switch.two