Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
Better version logic once again
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhorner committed Sep 12, 2023
1 parent 1546f0a commit da96689
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions custom_components/weatherkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
https://github.com/tjhorner/home-assistant-weatherkit
"""
from __future__ import annotations
from awesomeversion import AwesomeVersion

from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
CONF_PASSWORD,
CONF_USERNAME,
Platform,
MAJOR_VERSION,
MINOR_VERSION,
__short_version__,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.aiohttp_client import async_get_clientsession
Expand All @@ -30,7 +28,8 @@
# https://developers.home-assistant.io/docs/config_entries_index/#setting-up-an-entry
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up this integration using UI."""
if MAJOR_VERSION >= 2023 and MINOR_VERSION >= 10:
current_ha_version = AwesomeVersion(__short_version__)
if current_ha_version >= AwesomeVersion("2023.10"):
async_create_issue(
hass,
DOMAIN,
Expand Down

0 comments on commit da96689

Please sign in to comment.