miracle2k / onkyo-eiscp

Control Onkyo A/V receivers over the network; usuable as a script, or as a Python library.
MIT License
466 stars 110 forks source link

Onkyo TX-NR636 problem with source setting in HA script (YAML) on Zone 2 #152

Open darek203 opened 7 months ago

darek203 commented 7 months ago

Hello!

I'm trying to create a script that turn on my receiver and set its zone2 into "network_net" source. At least that is the name which I can see in developer tools.

image

For some reason it always starts it, but with the source that was previously selected, regardless of what I set in the script fir the media_content_type. What is more, whenever I had previously internet radio set (network_net) it gives me an error when launching Zone2:

Stopped because an error was encountered at 13 November 2023 12:23:24 (runtime: 2.15 seconds) 'network_net'

Strange thing is that Zone2 starts anyway and plays internet radio - I assume just because it was previously set. Here is the body of my script:

alias: Onkyo runining NET on Zone2
sequence:
  - service: media_player.turn_on
    target:
      entity_id: media_player.onkyo_tx_nr636_zone_2
    data: {}
  - service: media_player.play_media
    target:
      entity_id: media_player.onkyo_tx_nr636_zone_2
    data:
      media_content_id: "1"
      media_content_type: network_net

mode: single
icon: mdi:radio-tower

Any tips on how I should deal with that?