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.65k stars 30.41k forks source link

Universal Media Player "toggle" no longer works #47564

Closed jstys closed 3 years ago

jstys commented 3 years ago

The problem

On previous releases, the toggle command was able to properly toggle on/off power to a universal media player but this is no longer the case after some enhancements in the 2021.3 release.

What is version of Home Assistant Core has the issue?

2021.3.2

What was the last working version of Home Assistant Core?

2021.2

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Universal Media Player

Link to integration documentation on our website

https://www.home-assistant.io/integrations/universal/

Example YAML snippet

# Example Universal Media Player which previously allowed for toggle
- platform: universal
  name: Master Bedroom TV
  children:
    - media_player.viziocastdisplay1515
  commands:
    turn_on:
      service: media_player.turn_on
      data:
        entity_id: media_player.master_tv
    turn_off:
      service: media_player.turn_off
      data:
        entity_id: media_player.master_tv
    volume_up:
      service: media_player.volume_up
      data:
        entity_id: media_player.master_tv
    volume_down:
      service: media_player.volume_down
      data:
        entity_id: media_player.master_tv
    volume_mute:
      service: media_player.volume_mute
      data_template:
        entity_id: media_player.master_tv
        is_volume_muted: '{{ is_volume_muted }}'
    select_source:
      service: media_player.select_source
      data_template:
        entity_id: media_player.master_tv
        source: '{{ source }}'
  attributes:
    state: media_player.master_tv
    is_volume_muted: media_player.master_tv|is_volume_muted
    volume_level: media_player.master_tv|volume_level
    source: media_player.master_tv|source
    source_list: media_player.master_tv|source_list

Anything in the logs that might be useful for us?

N/A, no associated errors found in logs

probot-home-assistant[bot] commented 3 years ago

universal documentation universal source (message by IssueLinks)

mynameisdaniel32 commented 3 years ago

Also seeing a broken toggle with Universal Media Player with my existing config. Seems a toggle is pausing my child player now?

- platform: universal
  name: Living Room Radio
  children:
    - media_player.forked_daapd_server
  commands:
    turn_on:
      service: homeassistant.turn_on
      data:
        entity_id: media_player.forked_daapd_output_musicpi
    turn_off:
      service: homeassistant.turn_off
      data:
        entity_id: media_player.forked_daapd_output_musicpi
    volume_set:
      service: script.denon_rs232_set_volume
      data:
        volume_level: '{{ volume_level }}'
    volume_up:
      service: remote.send_command
      data:
        entity_id: remote.broadlink_rm_mini_living_room
        device: denon_avr
        command: vol_up
    volume_down:
      service: remote.send_command
      data:
        entity_id: remote.broadlink_rm_mini_living_room
        device: denon_avr
        command: vol_down
  attributes:
    state: media_player.forked_daapd_output_musicpi
    volume_level: sensor.denon_rs232_volume
barskaka commented 3 years ago

I got the same problem after updating. The media_player.toggle service does not work if the device is off.

github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

jstys commented 3 years ago

Issue still present on 2021.6.2

estevez-dev commented 3 years ago

Still an issue for 2021.7.4