Help with Alexa & Automation - Not working

I’ve got my HA exposed to Alexa via NabuCasa. The following automation works fine on its own, but I can’t get Alexa to trigger it. She says ‘ok’ when I speak the command but nothing happens. Anything I’m doing wrong to expose an automation to Alexa?

alias: Front Office Fan
description: “”
trigger:

  • platform: conversation
    command: Turn on front office fan
    condition:
    action:
  • service: switch.turn_on
    metadata: {}
    data: {}
    target:
    entity_id: switch.front_office_fan_switch
  • delay:
    hours: 0
    minutes: 0
    seconds: 0
    milliseconds: 100
  • service: fan.turn_on
    metadata: {}
    data: {}
    target:
    entity_id: fan.front_office_fan
    mode: single

This is not how you interface with Alexa for on/off commands.

All you do is expose your switch named Front Office Fan to alexa and on/off utterances will work. There’s no automation needed. The conversation platform & triggers only work with HA’s built in conversation agents.

The issue I’m trying to overcome is that I have a fan ‘power’ switch and then a Tasmota fan switch… if the power is off I’d like one command to turn it on, delay, then turn the actual fan on. Is that possible?

Thanks

You can make a template switch that does that, then only expose the template switch . Or you can make an automation that reacts to an input_boolean that way as well, however that method is typically harder because you need to create mutliple automations to keep the input boolean in sync with the state of the fan. The template switch is essentially easier, but also at the same time harder because it’s yaml only.

That worked like a champ. Thanks.

- platform: template
  
  fans:
    front_office_fan:
      friendly_name: Front Office Fan
      turn_on:
        - service: switch.turn_on
          target:
            entity_id: switch.front_office_fan_switch
        - delay: "00:00:05"
        - service: fan.turn_on
          target:
            entity_id:
              - fan.front_office_fan_remote
      turn_off:
        - service: fan.turn_off
          target:
            entity_id:
              - fan.front_office_fan_remote