NabuCasa Alexa devices

Hey there.

I hope this is the right spot.

I got the NabuCasa subscription and I can control my home assistant devices with Alexa. Great!
But does it work vice versa?
I got plugs that don’t work with HomeAssistant directly. But they paired with Alexa. Can I use them through HomeAssistant? In automations?

If your plugs can be turned on and off by an Alexa routine you should be able to trigger the routine with a binary sensor in HA.

Alexa only recognises a few device classes - “door” for example. So to operate your plug with an input_boolean dashboard switch, you would have to create a template binary of that class.

template:
  - binary_sensor:
      - name: test
        device_class: door
        state: >
            {% if is_state('input_boolean.test', 'off') %}
              off
            {% elif is_state('input_boolean.test', 'on') %}
              on
            {% endif %}

You could also turn the input_boolean on and off with an automation.

1 Like

Thanks for your reply :slight_smile:
Unfortunately I don’t understand anything you just wrote :sweat_smile:

1 Like

Well… :grinning_face_with_smiling_eyes:

Step 1: Write a routine in the Alexa app to turn your plug on and off with a voice command that’s different from the one the skill uses. Alexa skills seem to vary enormously and the one for your plugs may not allow you to do this - if so, you’re stuck.

Step 2: Create a toggle helper in home assistant to represent your plug.

Step 3: Create a template binary sensor by adding the code above to your configuration.yaml file, changing “test” to whatever you’ve called your helper.

Step 4: If you have everything exposed to Alexa (it sounds as if you have) the sensor should now appear there. Because it has the class “door” Alexa will show it as either open or closed. Edit your Alexa routine to replace the voice command with the trigger “When xxx opens”.

Toggling the helper in HA should now switch it on and off in Alexa.

1 Like

P.S.

Any day now some cross person will tell you to READ THE DOCS… :grinning_face_with_smiling_eyes: Here are some of them: