Skip to content

Apple TV pairing PIN cannot accept leading zero #179249

Description

@michaelgill101

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

When adding an Apple TV via Settings → Devices & services → Add Integration → Apple TV, the pairing PIN field does not allow 0 to be entered as the first digit (iPhone companion app).

For example, if the Apple TV displays the PIN 0123, Home Assistant only allows 123 to be entered.

The PIN input also does not allow the cursor to be repositioned, so there is no way to enter the leading zero manually.

This appears to be because the Apple TV config flow defines the PIN as an integer rather than a string. However, Apple TV pairing PINs are fixed-format codes and can legitimately begin with zero.

The only way to successfully pair is to delete the device and attempt to pair again.

Expected behaviour: The PIN field should accept leading zeroes, e.g. 0123.

Actual behaviour: The first 0 cannot be entered.

Home Assistant Core: latest stable (2026.8.2)

Integration: Apple TV

Installation type: Home Assistant OS

Describe the behavior you expected

The PIN field should accept leading zeroes, e.g. 0123.

Steps to reproduce the issue

  1. Add Apple TV device
  2. Pairing PIN appears on screen
  3. PIN entered into Companion app
  4. If PIN begins with '0', unable to enter
  5. Three PINs required for full pairing and can occur with any one

What version of Home Assistant Core has the issue?

2026.8.2

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue?

iPhone Companion app

Which operating system are you using to run this browser?

iOS 26.6

State of relevant entities

Problem-relevant frontend configuration

JavaScript errors shown in your browser console/inspector

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions