Apple TV Integration: Expose Firmware Version & MAC Address as Entities

Hello everyone,

I’m using the official Apple TV integration in Home Assistant (e.g., Apple TV 4K Gen 3). Right now, Home Assistant displays both the firmware version and the MAC address under “Device Info,” but these values are not exposed as separate entities or attributes.

I would really like to display both the firmware version and the MAC address on my dashboard and/or use them in automations. However, these values are not provided as either entities or attributes.

Proposed Feature

  • Firmware version as a sensor (e.g. sensor.apple_tv_firmware_version)
  • MAC address as a sensor or attribute (e.g. sensor.apple_tv_mac_address)

That way, these details can be easily used on dashboards or automations.

Attempts So Far

  • I tried using Template Sensors, but the necessary attributes (firmware_version or mac_address) aren’t present in the media_player entity.
  • Other workarounds (like custom sensors) also rely on these values being exposed as attributes.

Benefits

  • Monitoring of firmware version and potential notifications or tracking for updates.
  • Possibly useful for network monitoring or identification of devices on the home network.

Thank you to the Home Assistant team for all their hard work. I hope these two data points can be exposed as separate entities in a future release.

I’m not saying it wouldn’t be nice to have this, but you can get this information already:

{% set device = 'remote.appletv_4k' %}
{% set attrs = [
  "config_entries",
  "connections",
  "identifiers",
  "manufacturer",
  "model",
  "name",
  "sw_version",
  "hw_version",
  "entry_type",
  "id",
  "via_device_id",
  "area_id",
  "name_by_user",
  "disabled_by",
  "configuration_url"
  ] %}
{% for attr in attrs %}
{{ attr }}: {{ device_attr(device, attr) }}
{%- endfor %}

which returns:

config_entries: {'01J5BXD32KG90MKDGXFFR3RDAE'}
connections: {('mac', '48:e1:5c:ac:17:3d'), ('mac', '6a:3c:bc:db:5d:0f')}
identifiers: {('apple_tv', '48:E1:5C:AC:17:3D')}
manufacturer: Apple
model: Apple TV 4K (gen 3)
name: AppleTV 4K
sw_version: 18.2
hw_version: None
entry_type: None
id: 8209289acb7987fa2c9c794b7917a46c
via_device_id: None
area_id: av_closet
name_by_user: None
disabled_by: None
configuration_url: None

You can already access these attributes, using device_attr() in a template. The only problem is I have’t found any documentation anywhere for which device attributes exist, short of looking in the source code of each integration. The attributes you are after are sw_version and connections.

{{ device_attr('media_player.your_entity_id_here', 'sw_version') }}
{{ device_attr('media_player.your_entity_id_here', 'connections') }}

I think connections gives you back all the MAC addresses of all the connection points (i.e. ethernet and wifi if you have one with both). I think identifiers gives you just the active one. It’s a bit of a pain to get items out of that array, as the array appears to just be a string, but this will work:

{{ device_attr('remote.appletv_4k','identifiers')|regex_findall_index("', '(.+)'")  }}

and gives as a response:

48:E1:5C:AC:17:3D