keatontaylor / alexa-actions

A README and associated code to get actionable notifications setup for Alexa devices.
GNU General Public License v3.0
391 stars 186 forks source link

Requesting help with the "Installing the script" into home assitand #219

Closed MaximusgottTalos closed 8 months ago

MaximusgottTalos commented 8 months ago

Context: I'm a new guy on the comunity and im still learning thw basics, i follow the steps on the wiki and all seams going well i manage to confirm that amazon skill reach HA but on the 4th step when HA is trying to comunicated with Alexa i got stuck, i copy paste the suggested script and change the skill ID but HA keeps showing this error imagen_2024-01-07_162414193

The guide mention code must be on "/config/scripts.yaml" I assume it should be on settings > Automations & scenes > scripts

this is the code:

activate_alexa_actionable_notification:
  alias: activate_alexa_actionable_notification
  description: Activates an actionable notification on a specific echo device
  fields:
    text:
      description: The text you would like alexa to speak.
      example: 'What would you like the thermostat set to?'
    event_id:
      description: Correlation ID for event responses
      example: 'ask_for_temperature'
    alexa_device:
      description: Alexa device you want to trigger
      example: 'media_player.bedroom_echo'
    suppress_confirmation:
      description: Set true if you want to suppress 'okay' confirmation
      example: 'true'
  sequence:
    - service: input_text.set_value
      data_template:
        entity_id: input_text.alexa_actionable_notification
        value: '{"text": "{{ text }}", "event": "{{ event_id }}", "suppress_confirmation": "{{ suppress_confirmation }}"}'
    - service: media_player.play_media
      data_template:
        entity_id: "{{ alexa_device }}"
        media_content_type: skill
        media_content_id: amzn1.ask.skill.bbc326a4-381c-4913-9ca5-f45bc8bfcd7f
  mode: single
MaximusgottTalos commented 8 months ago

update. i mannage to install the script but now when i test on amazon developer account and the phisical device display error 401, im using account linking via nabu.casa (i double check of course that via the app is link and I manage to open my HA via this way) and i have notification on my HA about a fail log

MaximusgottTalos commented 8 months ago

As well, i kinda solve the first problem in a janky way i install the file editor, when strait fowar to scrips.yaml and Crtl +v right there, inmidiatly my echo found the script (as a scene) if there's any better way, im here for

DEADSEC-SECURITY commented 8 months ago

When you use the script UI builder you can't include the activate_alexa_actionable_notification part as it's the id of the script.

DEADSEC-SECURITY commented 8 months ago

update. i mannage to install the script but now when i test on amazon developer account and the phisical device display error 401, im using account linking via nabu.casa (i double check of course that via the app is link and I manage to open my HA via this way) and i have notification on my HA about a fail log

Unrelated, please open a new issue.