home-assistant-tapo-p100 icon indicating copy to clipboard operation
home-assistant-tapo-p100 copied to clipboard

Getting Error - ConfigEntry.__init__() missing 1 required keyword-only argument: 'minor_version'

Open ashishpandey opened this issue 1 year ago • 1 comments

Version of the integration

Tapo Controller Version: v2.13.0 HACS version: 1.33.0 HA Core Version: 2024.1.4

Configuration

Device: P110

YAML configuration:

switch:
- platform: tapo
  ip_address: 192.168.40.23
  username: !secret tapo_user
  password: !secret tapo_pass

Describe the bug

I have installed the tapo integration via HACS. Added a switch by pointing to it's IP. Have tried both ip_address: 192.168.40.23 and host: 192.168.40.23 in yaml configuration, and get the same error as above

Debug log

Error from logs

Logger: homeassistant.components.switch
Source: helpers/entity_platform.py:360
Integration: Switch ([documentation](https://www.home-assistant.io/integrations/switch), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+switch%22))
First occurred: 7:02:05 PM (2 occurrences)
Last logged: 7:02:05 PM

Error while setting up tapo platform for switch
Traceback (most recent call last):
  File "/lsiopy/lib/python3.11/site-packages/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/tapo/switch.py", line 32, in async_setup_platform
    coordinator = await setup_from_platform_config(hass, config)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tapo/setup_helpers.py", line 61, in setup_from_platform_config
    temporary_entry = ConfigEntry(
                      ^^^^^^^^^^^^
TypeError: ConfigEntry.__init__() missing 1 required keyword-only argument: 'minor_version'

ashishpandey avatar Jan 21 '24 12:01 ashishpandey

I had the same issue and got it working again.

First in "setup_helpers.py" file I added "minor_version = 1," on line 63. Then restarted home assistant and the error cleared Then I could add the lights via the UI.

Hope it helps

letchworth avatar Feb 03 '24 06:02 letchworth