I’ve previously had multiple automations set up, one for when the receiver is ON and one for when it’s OFF.
But that makes my coder brain hurt so I wanted to implement a simple if/else condition. But I’m apparently doing something wrong. Help?
Failed config automation: - Invalid config for [automation]: required key not provided @ data[‘trigger’][1][‘platform’].
- action:
alias: Manage Receiver when casting (LIVINGROOM)
id: '1521791104221'
trigger:
- entity_id: media_player.livingroom
platform: state
to: playing
- service: script.turn_on
data_template:
entity_id: >
{% if is_state('media_player.nad_receiver', 'on') %}
script.irsend_receiver_key_two
{% else %}
script.receiver_startandset_cast
{% endif %}