Skip to content

Commit

Permalink
HACS update to HACS #16
Browse files Browse the repository at this point in the history
  • Loading branch information
BeardedTinker committed Jul 9, 2022
1 parent b6a9c76 commit 9f946dd
Show file tree
Hide file tree
Showing 199 changed files with 4,719 additions and 4,360 deletions.
10 changes: 4 additions & 6 deletions custom_components/hacs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from dataclasses import asdict, dataclass, field
from datetime import timedelta
import gzip
import json
import logging
import math
import os
Expand Down Expand Up @@ -53,7 +52,8 @@
)
from .repositories import RERPOSITORY_CLASSES
from .utils.decode import decode_content
from .utils.logger import get_hacs_logger
from .utils.json import json_loads
from .utils.logger import LOGGER
from .utils.queue_manager import QueueManager
from .utils.store import async_load_from_store, async_save_to_store

Expand Down Expand Up @@ -163,8 +163,6 @@ class HacsStatus:

startup: bool = True
new: bool = False
reloading_data: bool = False
upgrading_all: bool = False


@dataclass
Expand Down Expand Up @@ -347,7 +345,7 @@ class HacsBase:
githubapi: GitHubAPI | None = None
hass: HomeAssistant | None = None
integration: Integration | None = None
log: logging.Logger = get_hacs_logger()
log: logging.Logger = LOGGER
queue: QueueManager | None = None
recuring_tasks = []
repositories: HacsRepositories = HacsRepositories()
Expand Down Expand Up @@ -473,7 +471,7 @@ async def async_github_get_hacs_default_file(self, filename: str) -> list:
if response is None:
return []

return json.loads(decode_content(response.data.content))
return json_loads(decode_content(response.data.content))

async def async_github_api_method(
self,
Expand Down
4 changes: 2 additions & 2 deletions custom_components/hacs/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from .const import CLIENT_ID, DOMAIN, MINIMUM_HA_VERSION
from .enums import ConfigurationType
from .utils.configuration_schema import RELEASE_LIMIT, hacs_config_option_schema
from .utils.logger import get_hacs_logger
from .utils.logger import LOGGER


class HacsFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
Expand All @@ -28,7 +28,7 @@ def __init__(self):
self._errors = {}
self.device = None
self.activation = None
self.log = get_hacs_logger()
self.log = LOGGER
self._progress_task = None
self._login_device = None
self._reauth = False
Expand Down
63 changes: 0 additions & 63 deletions custom_components/hacs/hacs_frontend/c.04294c77.js

This file was deleted.

Binary file not shown.
23 changes: 23 additions & 0 deletions custom_components/hacs/hacs_frontend/c.05e9df28.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import{a as t,r as i,n as a}from"./main-a0d7432d.js";import{L as n,s}from"./c.936d9772.js";let r=t([a("ha-list-item")],(function(t,a){return{F:class extends a{constructor(...i){super(...i),t(this)}},d:[{kind:"get",static:!0,key:"styles",value:function(){return[s,i`
:host {
padding-left: var(--mdc-list-side-padding, 20px);
padding-right: var(--mdc-list-side-padding, 20px);
}
:host([graphic="avatar"]:not([twoLine])),
:host([graphic="icon"]:not([twoLine])) {
height: 48px;
}
span.material-icons:first-of-type {
margin-inline-start: 0px !important;
margin-inline-end: var(
--mdc-list-item-graphic-margin,
16px
) !important;
direction: var(--direction);
}
span.material-icons:last-of-type {
margin-inline-start: auto !important;
margin-inline-end: 0px !important;
direction: var(--direction);
}
`]}}]}}),n);const e=t=>`https://brands.home-assistant.io/${t.useFallback?"_/":""}${t.domain}/${t.darkOptimized?"dark_":""}${t.type}.png`,o=t=>t.split("/")[4],d=t=>t.startsWith("https://brands.home-assistant.io/");export{r as H,e as b,o as e,d as i};
Binary file not shown.
33 changes: 33 additions & 0 deletions custom_components/hacs/hacs_frontend/c.0732ee74.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import{a as e,h as i,e as t,$ as r,d as o,r as d,n as c}from"./main-a0d7432d.js";import"./c.c176780d.js";e([c("hacs-filter")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[t({attribute:!1})],key:"filters",value:void 0},{kind:"field",decorators:[t({attribute:!1})],key:"hacs",value:void 0},{kind:"method",key:"render",value:function(){var e;return r`
<div class="filter">
${null===(e=this.filters)||void 0===e?void 0:e.map((e=>r`
<ha-formfield
class="checkbox"
.label=${this.hacs.localize(`common.${e.id}`)||e.value}
>
<ha-checkbox
.checked=${e.checked||!1}
.id=${e.id}
@click=${this._filterClick}
>
</ha-checkbox>
</ha-formfield>
`))}
</div>
`}},{kind:"method",key:"_filterClick",value:function(e){const i=e.currentTarget;this.dispatchEvent(new CustomEvent("filter-change",{detail:{id:i.id},bubbles:!0,composed:!0}))}},{kind:"get",static:!0,key:"styles",value:function(){return[o,d`
.filter {
display: flex;
border-bottom: 1px solid var(--divider-color);
align-items: center;
font-size: 16px;
height: 32px;
line-height: 4px;
background-color: var(--sidebar-background-color);
padding: 0 16px;
box-sizing: border-box;
}
.checkbox:not(:first-child) {
margin-left: 20px;
}
`]}}]}}),i);
Binary file not shown.
1 change: 0 additions & 1 deletion custom_components/hacs/hacs_frontend/c.0cdbe094.js

This file was deleted.

Binary file removed custom_components/hacs/hacs_frontend/c.0cdbe094.js.gz
Binary file not shown.
Loading

0 comments on commit 9f946dd

Please sign in to comment.