This commit is contained in:
2022-07-19 16:07:41 -07:00
48 changed files with 24 additions and 18 deletions

View File

@@ -23,13 +23,13 @@ from homeassistant.helpers.start import async_at_start
from homeassistant.loader import async_get_integration
import voluptuous as vol
from custom_components.hacs.frontend import async_register_frontend
from .base import HacsBase
from .const import DOMAIN, MINIMUM_HA_VERSION, STARTUP
from .enums import ConfigurationType, HacsDisabledReason, HacsStage, LovelaceMode
from .frontend import async_register_frontend
from .utils.configuration_schema import hacs_config_combined
from .utils.data import HacsData
from .utils.platform_setup import async_setup_entity_platforms
from .utils.queue_manager import QueueManager
from .utils.version import version_left_higher_or_equal_then_right
from .websocket import async_register_websocket_commands
@@ -169,14 +169,14 @@ async def async_initialize_integration(
hacs.log.info("Update entities are only supported when using UI configuration")
else:
if hacs.configuration.experimental:
hass.config_entries.async_setup_platforms(
hacs.configuration.config_entry, [Platform.SENSOR, Platform.UPDATE]
)
else:
hass.config_entries.async_setup_platforms(
hacs.configuration.config_entry, [Platform.SENSOR]
)
await async_setup_entity_platforms(
hacs,
hass,
config_entry,
[Platform.SENSOR, Platform.UPDATE]
if hacs.configuration.experimental
else [Platform.SENSOR],
)
hacs.set_stage(HacsStage.SETUP)
if hacs.system.disabled:

View File

@@ -54,6 +54,7 @@ from .repositories import RERPOSITORY_CLASSES
from .utils.decode import decode_content
from .utils.json import json_loads
from .utils.logger import LOGGER
from .utils.platform_setup import async_setup_entity_platforms
from .utils.queue_manager import QueueManager
from .utils.store import async_load_from_store, async_save_to_store
@@ -730,7 +731,9 @@ class HacsBase:
platforms=platforms,
)
self.hass.config_entries.async_setup_platforms(self.configuration.config_entry, platforms)
await async_setup_entity_platforms(
self, self.hass, self.configuration.config_entry, platforms
)
@callback
def async_dispatch(self, signal: HacsDispatchEvent, data: dict | None = None) -> None:

View File

@@ -1,9 +1,9 @@
try {
new Function("import('/hacsfiles/frontend/main-a0d7432d.js')")();
new Function("import('/hacsfiles/frontend/main-7bc9a818.js')")();
} catch (err) {
var el = document.createElement('script');
el.src = '/hacsfiles/frontend/main-a0d7432d.js';
el.src = '/hacsfiles/frontend/main-7bc9a818.js';
el.type = 'module';
document.body.appendChild(el);
}

View File

@@ -1,3 +1,3 @@
{
"./src/main.ts": "main-a0d7432d.js"
"./src/main.ts": "main-7bc9a818.js"
}

View File

@@ -1 +1 @@
VERSION="20220709114425"
VERSION="20220714083628"

View File

@@ -18,5 +18,5 @@
"requirements": [
"aiogithubapi>=22.2.4"
],
"version": "1.26.0"
"version": "1.26.2"
}

View File

@@ -619,7 +619,10 @@ class HacsRepository:
extractable = []
for path in zip_file.filelist:
filename = "/".join(path.filename.split("/")[1:])
if filename.startswith(self.content.path.remote):
if (
filename.startswith(self.content.path.remote)
and filename != self.content.path.remote
):
path.filename = filename.replace(self.content.path.remote, "")
extractable.append(path)

File diff suppressed because one or more lines are too long