Alexa Devices in HAOS 17: I cannot set volume

I cannot seem to change the volume for my alexa device using nabu casa on HAOS 17. I want the device to loudly announce that the door is open so it needs to set the volume all the way up then run the sound. I can get the yaml to work when announcing the door is open. However, the media_player volume does not recognize the entity. How do I fix this?

I attached a code snippet and a screenshot of the device.

alias: Door Notifications
description: Sets Basement Bongos to max volume for alert, then restores it
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.front_door_sensor_window_door_is_open_2
      - binary_sensor.open_close_xs_sensor_window_door_is_open
      - binary_sensor.back_kitchen_door_sensor_window_door_is_open
    to: "on"
actions:
  - action: scene.create
    data:
      scene_id: basement_bongos_snapshot
      snapshot_entities:
        - media_player.basement_bongos
  - action: media_player.volume_set
    target:
      entity_id: media_player.basement_bongos
    data:
      volume_level: 1
  - action: alexa_devices.send_sound
    data:
      sound: air_horn_03
      device_id: fc029d53cd71e41e54c2b78c13ef65ab
  - delay: "00:00:03"
  - action: scene.turn_on
    target:
      entity_id: scene.basement_bongos_snapshot
mode: single

The Alexa Devices integration does not create media_player entities. You may be confusing it with the Alexa Media Player custom integration. Double check that the entity media_player.basement_bongos exists in the Entities settings dashboard.

If you don’t have AMP installed, you can use AD’s send_text_command action as a workaround:

action: alexa_devices.send_text_command
data:
  device_id: fc029d53cd71e41e54c2b78c13ef65ab
  text_command: "set volume to 10"

But there isn’t a way to get it back to the original volume using ad hoc scenes without AMP.

Indeed, Alexa Devices “currently” doesn’t create media_player entities, but the PR for media_player entities was just merged. We should see media_player entities and volume control on the next release, hopefully. As @Didgeridrew said, for now, use the send_text_command action to change volume. Batching was added on the last release, so you can send a text command to raise volume, run your sound/announcement, then run another text command to have the volume return to your preferred level.

1 Like