I know that the use of entity_id has been depricated and am trying to tidy up my config to get rid of someof the errors. My garage door covers follow the template cover example given in the documentation - which still uses the entity_id for the action:
cover:
- platform: template
covers:
left_garage_door:
device_class: garage
friendly_name: "Left Garage Door Controller"
value_template: "{{ is_state('binary_sensor.left_garage_door_sensor', 'on') }}"
open_cover:
- service: switch.turn_on
data:
entity_id: switch.left_garage_door_open_switch
close_cover:
- service: switch.turn_on
data:
entity_id: switch.left_garage_door_close_switch
icon_template: >-
{% if is_state('binary_sensor.left_garage_door_sensor', 'on') %}
mdi:garage-open
{% else %}
mdi:garage
{% endif %}
right_garage_door:
device_class: garage
friendly_name: "Right Garage Door Controller"
value_template: "{{ is_state('binary_sensor.right_garage_door_sensor', 'on') }}"
open_cover:
- service: switch.turn_on
data:
entity_id: switch.right_garage_door_open_switch
close_cover:
- service: switch.turn_on
data:
entity_id: switch.right_garage_door_close_switch
icon_template: >-
{% if is_state('binary_sensor.right_garage_door_sensor', 'on') %}
mdi:garage-open
{% else %}
mdi:garage
{% endif %}
So if I remove the entity_id, how can the script identify which script to turn on? Thanks!