Ecobee integration failing on authorize request

Hey all,
I’ve been searching around on this issue, but haven’t seen any hits. When I try to integrate my ecobee thermostat into HA (2021.2.3), I get the following error after filling in the API key.

2021-02-28 20:34:40 ERROR (SyncWorker_0) [pyecobee] Error connecting to ecobee while attempting to request pin. Possible connectivity outage.

  • I’ve deleted the Ecobee Application entry and created a new one a few times now.
  • I spun up a brand new VM with a fresh HA image and still saw the same error.
  • I tried a failing API key with the Ecobee developer example pages and saw a pin successfully created

So, I found the magic to turn on some additional logging, for ecobee and pyecobee, and got a little more detail out. This is all that I see in the logs around the time of the error.

2021-02-28 20:34:35 DEBUG (SyncWorker_0) [pyecobee] Making request to authorize endpoint to request pin: url: https://api.ecobee.com/authorize, headers: {}, params: {'response_type': 'ecobeePin', 'client_id': 'xxxxxxxxxxxx', 'scope': 'smartWrite'}, body: None
2021-02-28 20:34:40 ERROR (SyncWorker_0) [pyecobee] Error connecting to ecobee while attempting to request pin. Possible connectivity outage.
2021-02-28 20:34:40 DEBUG (SyncWorker_0) [pyecobee] Error obtaining PIN code from ecobee: 'NoneType' object is not subscriptable

Note: I scrubbed the real key out of the log message.

Has the format of the authorize request changed? I haven’t seen anything indicating that others are seeing this issue. Did I miss something?

Thanks!
Brent

Update: I found the source of the failure. In my Home Assistant OS install, api.ecobee.com was not resolving with the default DNS settings. Other domains appeared to resolve fine, and other devices on my network could resolve api.ecobee.com.
I explicitly set another DNS server and the integration succeeded.