home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.82k stars 30.51k forks source link

Alexa Integration still sends excluded entities back #89689

Closed jkoenig72 closed 1 year ago

jkoenig72 commented 1 year ago

The problem

Hi, done setup. Nice work btzw.

My config - the idea is to exclude everything, then add piece by piece.

#############

alexa: smart_home: locale: de-DE filter: endpoint: https://api.eu.amazonalexa.com/v3/events client_id: [removed] client_secret: [removed] exclude_domains:

#############

When I use the test request:

I got this: stuff that should be excluded? Any idea what I do wrong?

What config excludes everything and just allow single entites?

interface":"Alexa.EndpointHealth","version":"3","properties":{"supported":[{"name":"connectivity"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa","version":"3"}]},{"displayCategories":["SWITCH"],"cookie":{},"endpointId":"switch#tasmota_4ch34","friendlyName":"tasmota-4ch34","description":"switch.tasmota_4ch34 via Home Assistant","manufacturerName":"Home Assistant","additionalAttributes":{"manufacturer":"Home Assistant","model":"switch","softwareVersion":"2023.3.3","customIdentifier":"-switch.tasmota_4ch34"},"capabilities":[{"type":"AlexaInterface","interface":"Alexa.PowerController","version":"3","properties":{"supported":[{"name":"powerState"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa.ContactSensor","version":"3","properties":{"supported":[{"name":"detectionState"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa.EndpointHealth","version":"3","properties":{"supported":[{"name":"connectivity"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa","version":"3"}]},{"displayCategories":["SWITCH"],"cookie":{},"endpointId":"switch#tasmota_water1","friendlyName":"tasmota-water1","description":"switch.tasmota_water1 via Home Assistant","manufacturerName":"Home Assistant","additionalAttributes":{"manufacturer":"Home Assistant","model":"switch","softwareVersion":"2023.3.3","customIdentifier":"-switch.tasmota_water1"},"capabilities":[{"type":"AlexaInterface","interface":"Alexa.PowerController","version":"3","properties":{"supported":[{"name":"powerState"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa.ContactSensor","version":"3","properties":{"supported":[{"name":"detectionState"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa.EndpointHealth","version":"3","properties":{"supported":[{"name":"connectivity"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa","version":"3"}]},{"displayCategories":["SWITCH"],"cookie":{},"endpointId":"switch#hpp1","friendlyName":"HPP1","description":"switch.hpp1 via Home Assistant","manufacturerName":"Home Assistant","additionalAttributes":{"manufacturer":"Home Assistant","model":"switch","softwareVersion":"2023.3.3","customIdentifier":"-switch.hpp1"},"capabilities":[{"type":"AlexaInterface","interface":"Alexa.PowerController","version":"3","properties":{"supported":[{"name":"powerState"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa.ContactSensor","version":"3","properties":{"supported":[{"name":"detectionState"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa.EndpointHealth","version":"3","properties":{"supported":[{"name":"connectivity"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa","version":"3"}]},{"displayCategories":["TEMPERATURE_SENSOR"],"cookie":{},"endpointId":"sensor#xiaomi_miflora6_temperature","friendlyName":"Xiaomi MiFlora6 Temperature","description":"sensor.xiaomi_miflora6_temperature via Home Assistant","manufacturerName":"Home Assistant","additionalAttributes":{"manufacturer":"Home Assistant","model":"sensor","softwareVersion":"2023.3.3","customIdentifier":"-sensor.xiaomi_miflora6_temperature"},"capabilities":[{"type":"AlexaInterface","interface":"Alexa.TemperatureSensor","version":"3","properties":{"supported":[{"name":"temperature"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa.EndpointHealth","version":"3","properties":{"supported":[{"name":"connectivity"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa","version":"3"}]}]}}} END RequestId: 896ce335-4836-4cd5-83b3-4d8da501ee44 REPORT RequestId: 896ce335-4836-4cd5-83b3-4d8da501ee44 Duration: 1033.76 ms Billed Duration: 1034 ms Memory Size: 128 MB Max Memory Used: 48 MB Init Duration: 220.35 ms

What version of Home Assistant Core has the issue?

Home Assistant 2023.3.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Amazon Alexa Smart Home Skill

Link to integration documentation on our website

https://www.home-assistant.io/integrations/alexa.smart_home/

Diagnostics information

interface":"Alexa.EndpointHealth","version":"3","properties":{"supported":[{"name":"connectivity"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa","version":"3"}]},{"displayCategories":["SWITCH"],"cookie":{},"endpointId":"switch#tasmota_4ch34","friendlyName":"tasmota-4ch34","description":"switch.tasmota_4ch34 via Home Assistant","manufacturerName":"Home Assistant","additionalAttributes":{"manufacturer":"Home Assistant","model":"switch","softwareVersion":"2023.3.3","customIdentifier":"-switch.tasmota_4ch34"},"capabilities":[{"type":"AlexaInterface","interface":"Alexa.PowerController","version":"3","properties":{"supported":[{"name":"powerState"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa.ContactSensor","version":"3","properties":{"supported":[{"name":"detectionState"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa.EndpointHealth","version":"3","properties":{"supported":[{"name":"connectivity"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa","version":"3"}]},{"displayCategories":["SWITCH"],"cookie":{},"endpointId":"switch#tasmota_water1","friendlyName":"tasmota-water1","description":"switch.tasmota_water1 via Home Assistant","manufacturerName":"Home Assistant","additionalAttributes":{"manufacturer":"Home Assistant","model":"switch","softwareVersion":"2023.3.3","customIdentifier":"-switch.tasmota_water1"},"capabilities":[{"type":"AlexaInterface","interface":"Alexa.PowerController","version":"3","properties":{"supported":[{"name":"powerState"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa.ContactSensor","version":"3","properties":{"supported":[{"name":"detectionState"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa.EndpointHealth","version":"3","properties":{"supported":[{"name":"connectivity"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa","version":"3"}]},{"displayCategories":["SWITCH"],"cookie":{},"endpointId":"switch#hpp1","friendlyName":"HPP1","description":"switch.hpp1 via Home Assistant","manufacturerName":"Home Assistant","additionalAttributes":{"manufacturer":"Home Assistant","model":"switch","softwareVersion":"2023.3.3","customIdentifier":"-switch.hpp1"},"capabilities":[{"type":"AlexaInterface","interface":"Alexa.PowerController","version":"3","properties":{"supported":[{"name":"powerState"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa.ContactSensor","version":"3","properties":{"supported":[{"name":"detectionState"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa.EndpointHealth","version":"3","properties":{"supported":[{"name":"connectivity"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa","version":"3"}]},{"displayCategories":["TEMPERATURE_SENSOR"],"cookie":{},"endpointId":"sensor#xiaomi_miflora6_temperature","friendlyName":"Xiaomi MiFlora6 Temperature","description":"sensor.xiaomi_miflora6_temperature via Home Assistant","manufacturerName":"Home Assistant","additionalAttributes":{"manufacturer":"Home Assistant","model":"sensor","softwareVersion":"2023.3.3","customIdentifier":"-sensor.xiaomi_miflora6_temperature"},"capabilities":[{"type":"AlexaInterface","interface":"Alexa.TemperatureSensor","version":"3","properties":{"supported":[{"name":"temperature"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa.EndpointHealth","version":"3","properties":{"supported":[{"name":"connectivity"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa","version":"3"}]}]}}} END RequestId: 896ce335-4836-4cd5-83b3-4d8da501ee44 REPORT RequestId: 896ce335-4836-4cd5-83b3-4d8da501ee44 Duration: 1033.76 ms Billed Duration: 1034 ms Memory Size: 128 MB Max Memory Used: 48 MB Init Duration: 220.35 ms

Example YAML snippet

#############

alexa:
  smart_home:
  locale: de-DE
  filter:
    endpoint: https://api.eu.amazonalexa.com/v3/events
    client_id: [removed]
    client_secret: [removed]
    exclude_domains:
      - automation
      - alert
      - input_boolean
      - media_player
      - binary_sensor
      - switch
      - camera
      - light
      - automation
      - script
      - sensor
      - device-tracker
      - lock
      - fan
      - remote
      - alarm_control_panel
      - input_select
      - input_number
      - person
      - sun
      - climate 
      - weather
      - zone
      - persistent_notification
      - air_quality
    include_entities:
      - switch.evening_lights
  entity_config:
    switch.evening_lights:
      name: Abendbeleuchtung
      description: Abendbeleuchtung
      display_categories: LIGHT

#############

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @home-assistant/cloud, @ochlocracy, @jbouwh, mind taking a look at this issue as it has been labeled with an integration (alexa) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `alexa` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign alexa` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


alexa documentation alexa source (message by IssueLinks)

jkoenig72 commented 1 year ago

Giving my config I should only see switch.evening_lights, right? It exists in the config. but I only got different stuff back.

Whats wrong?

jbouwh commented 1 year ago

It seems you make it too complex, you can just use include_entities:

https://github.com/home-assistant/core/blob/51b12cbf960bffc4ee9eced9a58bdd45da67e617/tests/components/alexa/test_smart_home.py#L2442-L2522

https://www.home-assistant.io/integrations/alexa.smart_home/#alexa-smart-home-component-configuration https://www.home-assistant.io/integrations/alexa.smart_home/#configure-filter

jkoenig72 commented 1 year ago

Cool, thanks!

On Mon 20. Mar 2023 at 17:01, Jan Bouwhuis @.***> wrote:

It seems you make it too complex, you can just use include_entities:

https://github.com/home-assistant/core/blob/51b12cbf960bffc4ee9eced9a58bdd45da67e617/tests/components/alexa/test_smart_home.py#L2442-L2522

https://www.home-assistant.io/integrations/alexa.smart_home/#alexa-smart-home-component-configuration

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/89689#issuecomment-1476509782, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACKKCKRMGDCKPSKQARRUP4DW5B5N5ANCNFSM6AAAAAAV2IXYDI . You are receiving this because you authored the thread.Message ID: @.***>

jbouwh commented 1 year ago

Closing here assuming there is no further issue