Automation and Alexa ask question to user possible?

I’d like to know if there is a possibility to integrate an “Alexa ask to me” functionality on HA installed on Raspbian.

For example if I tell “Alexa, i go out” then the routine lauch an automation that turn off all light then Alexa respond OK.

Until here all is ok.

But i’d like a more step: for example the automation continue and check if all rollershutter are closed. If one is open, i’d like to Alexa ask to me “do you like to close all the roller also?” and i can answer yes or no

Is it possible a scenario like this?

1 Like

I too would be interested to know if that functionality exists.

I think you want to send an audio clip to play on the speaker and have that audio clip instruct the end-user to say “Alexa, close the blinds” or whatever action sequence is desired.

yes

read this

I have if no motion in office after 5 mins
alexa: ask is there some in the office
if I dont answer her she turn light off
if I answer yes light stay on and then she tell to stop hearing this turn the light switch ON

  - alias: "Alexa: Is there some in the Office"
    trigger:
      - platform: state
        entity_id: input_boolean.someone_in_room_1
        to: 'off'
        for:
          minutes: 5
    condition:
      - condition: state
        entity_id: sensor.office_switch
        state:  "OFF"
    action:
      - service: script.activate_alexa_actionable_notification
        data_template:
          text: 'Is anyone in the Office ?'
          event_id: alexa_notification_office_occupied
          alexa_device: 'media_player.office_dot'

if I answer YES

  - alias: Yes response for alexa_notification_bedroom_occupied question 
    trigger:
      platform: event
      event_type: alexa_actionable_notification
      event_data:
        event_id: alexa_notification_office_occupied
        event_response_type: ResponseYes
    action:
    - data:
        entity_id: input_boolean.someone_in_room_1
      service:  input_boolean.turn_on
    - delay: 00:00:01 
    - data:
        entity_id: input_boolean.someone_in_room_1
      service: input_boolean.turn_off
    - service: notify.alexa_media
      data_template:
        target: 
          - '{{ states.sensor.last_alexa.state }}'
        message: "If you want to stop hereing this message turn the wall switch on."
        data:
          type: announce
          method: all 

NO one answers

  - alias: None response for alexa_notification_bedroom_occupied question 
    trigger:
      platform: event
      event_type: alexa_actionable_notification
      event_data:
        event_id: alexa_notification_office_occupied
        event_response_type: ResponseNone
    action:
      - data:
          entity_id: light.office
        service: light.turn_off

and heres the script

#=======================================================================
#
#=======================================================================
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_dot
  sequence:
  - service: input_text.set_value
    data_template:
      entity_id: input_text.alexa_actionable_notification
      value: '{"text": "{{ text }}", "event": "{{ event_id }}"}'
  - service: media_player.play_media
    data_template:
      entity_id: '{{ alexa_device }}'
      media_content_type: skill
      media_content_id: bla-bla-bla

I work on the her asking me if she should take control of the gas heater climate control.

3 Likes

Cant get this to work and do not know what I’m doing wrong. All Alexa says is there was a problem with he custom skills response.