How to record Apple TV viewing history?

Is there a way to set the recorder to record the viewing history beyond “playing”, “paused”, “idle” etc.?

In the media controller I can see which TV show currently is playing, how do I add this to the recorder?

You could write them to the log like this.

You can create a template sensor

apple_tv_currently_playing:
  friendly_name: Apple TV currently playing
  value_template: "{{ states.media_player.name_of_your_apple_tv.attributes.media_title }}"

More information about template sensors:

Thank you. It seems your code was in the legacy template sensor configuration, but I was able to transform it in the current configuration:

template:
  - sensor:
      - name: "Apple TV Now Playing"
        state: "{{ states.media_player.name_of_your_apple_tv.attributes.media_title }}"
1 Like