Skip to content

Teslemetry.migrate_to_oauth() takes from 1 to 3 positional arguments but 4 were given #264

@ljb2of3

Description

@ljb2of3

The problem

I upgraded HA today and Teslemetry broke. I upgraded Home Assistant Core from 2025.10 to 2025.12, and Teslemtry to 5.0.13. Unfortunately, I don't remember what version I was on before. I got the following error in the logs.

Logger: homeassistant.config_entries
Source: config_entries.py:1110
First occurred: 12:13:18 PM (1 occurrence)
Last logged: 12:13:18 PM

Error migrating entry Teslemetry for teslemetry
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1110, in async_migrate
    result = await component.async_migrate_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/teslemetry/__init__.py", line 316, in async_migrate_entry
    data = await Teslemetry(session, access_token).migrate_to_oauth(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        CLIENT_ID, access_token, hass.config.location_name
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
TypeError: Teslemetry.migrate_to_oauth() takes from 1 to 3 positional arguments but 4 were given

What version of Home Assistant Core has the issue?

core-2025.12.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions