rainepretorius / olarm-ha-integration

Integration for Olarm devices created by a BSC(Computer Science and Mathematics) student.
https://raine.pretoriusse.net
BSD 2-Clause "Simplified" License
30 stars 13 forks source link

[Bug]: Missing minor_version in config_flow #93

Closed MrPrisoner closed 10 months ago

MrPrisoner commented 10 months ago

Contact Details

MrPrisoner

What happened?

When setting up the Olarm integration, "Unknown error occurred" displays. According to logs it is a missing minor_version for ConfigEntry.

A quick fix I applied is to add minor_version=0 after version, line 109:

version=1,
minor_version=0,  # Quick fix
title="Olarm Sensors",

With this fix applied the integration can be setup without issues.

Version

2.2.6

Relevant log output form Home Assistant

File "/config/custom_components/olarm_sensors/config_flow.py", line 105, in async_step_user
    temp_entry = ConfigEntry(
                 ^^^^^^^^^^^^
TypeError: ConfigEntry.__init__() missing 1 required keyword-only argument: 'minor_version'

Downloaded integration debug logs.

-
rainepretorius commented 10 months ago

Hi @MrPrisoner ,

I will have a look here asap. I suspect it is the new Core 2024 that is causing the issues. I will add it in the new version of Olarm Sensors

MrPrisoner commented 10 months ago

Thanks @rainepretorius

Agreed, I did a quick search and seems like the minor version functionality was introduced to HA in December.

Extra info: I picked this up because upon upgrading Olarm from 2.2.4 to 2.2.6 all my entities were duplicated with the new entities having a "2" at the end. Deleted the integration and re-added it so that my entity names would be correct again. If you also want to look at this.

Thanks for the effort with the integration, I use this daily :)

rainepretorius commented 10 months ago

I will have a look at why it could have doubled the entities. It should not happen, but will have a look.