Seeking Help with Multi-Trigger Automation Setup

Hey everyone, I’m diving into the world of smart home automation and I must say, it’s both exciting and a bit overwhelming! I’m currently trying to set up an automation that triggers when two dropdown inputs are changed simultaneously. The goal is to control an air purifier based on the selected room and mode. I’ve managed to configure the dropdown selections in my configuration.yaml file, and I’ve even created a card to display them. However, the automation part is proving to be quite tricky.

Here’s what I have so far in my automations.yaml file:

yaml

  • alias: Air Purifiers Selector
    trigger:
    • platform: state
      entity_id: input_select.air_purifier
    • platform: state
      entity_id: input_select.purifier_mode
      action:
    • service: fan.set_speed
      data_template:
      entity_id: >
      {% if is_state(“input_select.air_purifier”, “Birou”) %}
      fan.air_purifier_birou.purifier_mode
      {% else %}
      {% endif %}

Unfortunately, this setup isn’t working as expected. I suspect there might be an issue with how I’m handling the conditional logic or perhaps the way I’m referencing the entity IDs. I’ve tried troubleshooting by checking the logs and ensuring all entities are correctly configured, but I’m still stuck.

I’d really appreciate any guidance or suggestions from the community. Have any of you successfully set up similar automations with multiple triggers? What pitfalls should I be aware of, and how can I ensure the automation runs smoothly? Your insights would be invaluable as I continue to explore the possibilities of smart home automation!

Thanks in advance for your help and support! :pray: