Hi,
I want to create a template switch with several entities as target.
I tried the following code:
switch:
- platform: template
switches:
heizung_eg_heat:
turn_on:
service: switch.turn_on
target:
- entity_id: switch.heizung_eg_a8_relay1
- entity_id: switch.heizung_eg_a8_relay2
turn_off:
service: switch.turn_off
target:
- entity_id: switch.heizung_eg_a8_relay1
- entity_id: switch.heizung_eg_a8_relay2
- entity_id: switch.heizung_eg_a8_relay3
- entity_id: switch.heizung_eg_a8_relay4
- entity_id: switch.heizung_eg_a8_relay5
- entity_id: switch.heizung_eg_a8_relay6
But I get as error the following:
Logger: homeassistant.components.hassio
Source: components/hassio/__init__.py:586
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: 11:36:08 (1 occurrences)
Last logged: 11:36:08
The system cannot restart because the configuration is not valid: Invalid config for [switch.template]: expected a dictionary for dictionary value @ data['switches']['heizung_eg_heat']['turn_off'][0]['target']. Got None expected a dictionary for dictionary value @ data['switches']['heizung_eg_heat']['turn_on'][0]['target']. Got None. (See ?, line ?).
Can someone tell me what is wrong? Or is that not possible and I can only do that via grouping the elements before into one entity ?
Thank you in advance.
Greets Karl