Detect Atmos output on receiver from state attributes, attributes seem gone since a couple of months. what changed?

Hi! quite new to this so… probably just something simple i’m missing

I’m trying to do something when i play something via the receiver(onkyo) that has an Atmos soundtrack

this is the attributes from the receiver when playing atmos:

This is the automation i’m trying but it does not detect the Atmos information

alias: Atmos
description: Detect atmos track on receiver
trigger:
  - platform: state
    entity_id:
      - media_player.onkyo_surround_receiver
    attribute: audio_information
    for:
      hours: 0
      minutes: 0
      seconds: 1
condition:
  - condition: template
    value_template: >-
      "{{state_attr('media_player.onkyo_surround_receiver','audio_information')
      is search('Dolby Atmos/TrueHD')}}"
action:
  - device_id: sdfsfsdfs
    domain: light
    entity_id: light.yeelight_strip6_sdfsdf
    type: flash
mode: single

any suggestions?

This solved it.

alias: Atmos
description: Detect atmos track on receiver
trigger:
  - platform: state
    entity_id:
      - media_player.onkyo_surround_receiver
    attribute: audio_information
    for:
      hours: 0
      minutes: 0
      seconds: 0
condition:
  - condition: template
    value_template: >-
      {{state_attr('media_player.onkyo_surround_receiver','audio_information')|string|regex_search('Atmos',
      ignorecase=True) }}
action:
  - device_id: gsdfsdfsfsfsfs
    domain: light
    entity_id: light.yeelight_strip6_0xsdfsf
    type: flash
mode: single

this also works and is probably a bit prettier

    value_template: >-
      {{'Atmos' in
      state_attr('media_player.onkyo_surround_receiver','audio_information')['format']
      }}
condition:
  - condition: template
    value_template: "{{ 'Dolby Atmos' in trigger.to_state.attributes.audio_information }}"

Or simply this (Template Condition in shorthand notation).

condition:
  - "{{ 'Dolby Atmos' in trigger.to_state.attributes.audio_information }}"

That was one of my earliest tests


i needed the addition of [format] and i guess that is needed if looking at the trigger too.

I see. I had assumed the value of the audio_information attribute is a string but it’s actually a dictionary.

In that case, it’s like this:

condition:
  - "{{ 'Dolby Atmos' in trigger.to_state.attributes.audio_information.format }}"

No need to use state_attr() because, when the automation’s State Trigger is triggered, the trigger variable will contain information about the media_player’s state-change.

Reference: Automation Trigger Variables

Seem like i’ve lost alot of info from the onkyo integration… this is what i get (since jun 4)

should be audio and video information as before.

I’m facing the exact same problem: audio and video informations have disappeared from the state attributes…

Reboot of H.A. solved the problem…until the next day !
I imagine this shoud be some problem in onkyo integration… ?

Any idea are welcome :slight_smile:

Eddy

In my case (TX-NR609), further investigations show that:

  1. The problem of missing audio / video information only appears with media_player attributes ! (somedays they are there and somedays not !), here below, they are missing !

  2. Asking directly the AV shows well the audio and video information.