Show state attributes (multiple levels) and get them as a notification

Hi, i have seen that my onkyo amplifier has these states:

source_list:
  - TV
volume_level: 0.5125
is_volume_muted: false
source: tv
audio_information:
  format: PCM
  input_frequency: 48 kHz
  input_channels: 2.0 ch
  listening_mode: All Ch Stereo
  output_channels: 5.1 ch
  output_frequency: ''
video_information:
  input_resolution: Unknown
  input_color_schema: ''
  input_color_depth: 24bit
  output_resolution: Unknown
  output_color_schema: ''
  output_color_depth: 24bit
  picture_mode: ''
video_out: 'yes,out'
friendly_name: Onkyo
supported_features: 20364

i would like to show the audio_information\output_channels in lovelace in states.

I tried the following:
https://github.com/custom-cards/entity-attributes-card
but i am only able to show the parent level states (source, is_volume_muted etc) and not the child levels (output_channels etc).

Any way to do that?

You could use a markdown card for that. Or create a template sensor.

  - type: markdown
    title: Onkyo audio format
    content: "{{ state_attr('sensor.onkyo', 'audio_information').format }}"
1 Like

Thanks, any chance i can show that information in a notification during an automation?

what i actually need is, when i press play to a movie on plex, it currently turns off the lights, i would also like to send a notification to my tv (i display notifications for other information) and display the output channels of my amplifier.

You can use the same template for your notifaction as well.

But when you need the output channel in more than ne place I think a template sensor would be better.

1 Like