(hacs)
return True
Check if the version is valid.
Check if the version is valid.
Check if the version is valid .
def check_version(hacs):
    """Check if the version is valid."""
    with open(
        f"{hacs.system.config_path}/custom_components/hacs/manifest.json", "r"
    ) as read:
        manifest = json.loads(read.read())

    # Check if HA is the required version.
    if LooseVersion(hacs.system.ha_version) < LooseVersion(manifest["homeassistant"]):
        hacs.logger.critical(
            f"You need HA version {manifest['homeassistant']} or newer to use this integration."
        )
        return False
    return True
def check_version ( hacs ) : with open ( f"{hacs.system.config_path}/custom_components/hacs/manifest.json" , "r" ) as read : manifest = json . loads ( read . read ( ) ) # Check if HA is the required version. if LooseVersion ( hacs . system . ha_version ) < LooseVersion ( manifest [ "homeassistant" ] ) : hacs . logger . critical ( f"You need HA version {manifest['homeassistant']} or newer to use this integration." ) return False return True