Skip to content

Commit

Permalink
Fix minimum version check
Browse files Browse the repository at this point in the history
  • Loading branch information
ldotlopez committed Dec 29, 2023
1 parent 90782c3 commit 69c05a5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions homeassistant_historical_sensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@
from .state import HistoricalState

LOGGER = logging.getLogger(__name__)

if not (
(MAJOR_VERSION >= MIN_REQ_MAJOR_VERSION)
and (MINOR_VERSION >= MIN_REQ_MINOR_VERSION)
):
min_ver = (MIN_REQ_MAJOR_VERSION * 12) + MIN_REQ_MINOR_VERSION
cur_ver = MAJOR_VERSION * 12 + MINOR_VERSION
if cur_ver < min_ver:
msg = (
f"Running HomeAssistant {HA_FULL_VERSION}, "
f"Minimum required version >={MIN_REQ_MAJOR_VERSION}.{MIN_REQ_MINOR_VERSION}.0"
Expand Down

0 comments on commit 69c05a5

Please sign in to comment.