Preventing Alexa seeing certain devices?

I have no idea what he’s doing and he said he was new. If he’s using yaml, he needs to restart. If he’s using the UI, he may need to restart. I don’t use the UI so I’m not able to answer that question. When in doubt, give an answer that will always work regardless of UI or Yaml :wink:

got it, I am sticking UI and adding entities through integrations or helpers are visible into Alexa after discovery. If you are sticking with YAML, you have to restart it, right.

1 Like

Thanks both, well I restarted and still not showing :frowning:
Script is there and working, even added to a dashboard as a button and it’s working, but not showing in Alexa at all

Scripts may be only usable in the routines section. Try simply saying to her "Execute <script name>" or "Run <script name>"

Finally got it - I’m unsure if scripts are excluded by default, but it was not grabbing it until I explicitly called out the script in the Alexa YAML
Then it discovered it as a scene :slight_smile:

Thanks for your help!

I’m running into the same issue. I’ve tried the specific domains or entities which I want to exclude and for testing just resorted to trying o filter out all lights and switches. Optimally I would like to go with the include filter to only include devices which I add but nothing seems to get filtered. They’re all still working from Alexa and come right back after removing/discovery.

I’ve also been trying to use the Lambda Discovery test script in AWS from the YouTube video referenced in the first post to rule out any potential Alexa issue. Each time the script runs all my devices get pulled into the result.

Any guidance would be appreciated.

This is what I’m using in my configuration.yaml and have been restarting HA each time.

alexa:
  smart_home:
  filter:
    exclude_domains:
    - light
    - switch
    exclude_entities:
    - switch.*
    - light.*

Edit1:
Issue was the formatting, I have it working now with the following as a test config. The Lambda Discovery test is a quick way of testing the filters before spending time in Alexa to Delete & Discover.

alexa: 
  smart_home:
    filter:
      include_domains:
      - light
      - switch

@alixyz . This is what I am using in my config right now. Just keep in mind, you need to delete all entities you dont want from alexa app or through the web site:

alexa:
  smart_home:
    endpoint: https://api.amazonalexa.com/v3/events
    filter:
      include_entities:
        - switch.closet
        - switch.garage
        - switch.kids_bathroom
        - switch.kids_lamp
        - switch.unifyplug_switch
        - switch.zooz_zen15_power_cord_freezer
        - input_button.ztest_button_1
        - binary_sensor.garagedoor_sensor_iaszone
      include_domains:
        - climate
        - light
        - scene
        - script
        - input_button
        - fan
        - lock
      exclude_entity_globs:
        - light.browser_mod_*
      exclude_entities:
        - light.yard_group
        - light.garage
      exclude_domains:
        - automation
        - binary_sensor
        - camera
        - device_tracker
        - media_player
        - remote
        - sensor
        - input_boolean
        - input_datetime
        - input_number
        - input_select
        - input_text
        - weather
1 Like

Thanks for the example with the various options.

You are welcome!

In your example, you include entity binary_sensor.garagedoor_sensor_iaszone but afterwards you exclude domain binary_sensor : isn’t this domain exclusion making the prior entity inclusion useless ? (because overridden)
Or is it just for the sake of the example with no real “logic” between lines ?

I think the indentation is still no good and should be :

alexa: 
  smart_home:
    filter:
      include_domains:
        - light
        - switch

(please note the 2 last lines)

Maybe you can try to exclude all switch entities except (include_entities) switch.tasmota_20, etc…

exclude_entities:
  - switch.*
include_entities:
  - switch.tasmota_20
  ...

or

exclude_domains:
  - switch
include_entities:
  - switch.tasmota_20
  ...

I’m not sure in what order those filters are read/applied (even after reading the documentation)

Note : you might have to delete already imported devices in the Alexa app

The config was totally fine but I guess I could use that code as well. It had something to do with ARN location. As soon as I changed it from NA West 1 (N. California) to NA East 1 (Virginia), it immediately started working.
Thanks.

1 Like

Filters are applied as follows:

  1. No filter
  • All entities included
  1. Only includes
  • Entity listed in entities include: include
  • Otherwise, entity matches domain include: include
  • Otherwise, entity matches glob include: include
  • Otherwise: exclude
  1. Only excludes
  • Entity listed in exclude: exclude
  • Otherwise, entity matches domain exclude: exclude
  • Otherwise, entity matches glob exclude: exclude
  • Otherwise: include
  1. Domain and/or glob includes (may also have excludes)
  • Entity listed in entities include: include
  • Otherwise, entity listed in entities exclude: exclude
  • Otherwise, entity matches glob include: include
  • Otherwise, entity matches glob exclude: exclude
  • Otherwise, entity matches domain include: include
  • Otherwise: exclude
1 Like