Skip to content

Commit

Permalink
Merge next into master for 0.10.0 (#196)
Browse files Browse the repository at this point in the history
* add new integration: Hass-Custom-Alarm (#152)

as per akasma74/Hass-Custom-Alarm#11 (comment)

* Set DEV as version

* add new integration: Hass-Custom-Alarm (#152)

as per akasma74/Hass-Custom-Alarm#11 (comment)

* Set DEV as version

* Adding remote control custom card (#156)

* Add alexa_media_player (#159)

* Add alexa_media_player

* Adds ','

* Init testing

* Add option to set minimum HA version in manifest

* Add note to documentation about min HA version

* multi deploy?

* missing

* push it?

* Add pipline config as a listener

* Clean dir

* Speed up repository page load

* Default back to None

* Adding Meross IoT library (#161)

Proposing the Meross HomeAssistant Custom component as default one.

* test

* Fix load tests

* Add iphonedetect-integration (#162)

* Add integration for "Virgin Tivo" (#163)

* Add philips_android_tv integration (#166)

* docs?

* simplify

* set 3bf1223

* Update const.py (#168)

Added Flo water sensor

* Fix TimeoutError issue

* added ljmerza cards (#174)

* Badges

* Add beta info

* generic

* Remove log

* Adds Ceerbeerus/beerbolaget

* Fix changelog links

* Add claytonjn/hass-circadian_lighting (#180)

to default integration repositories

* Add thomasloven/hass-browser_mod to default repo (#179)

* remove TODO

* Update repository.py (#185)

* Update const.py (#186)

* Don't use pre-release (#187)

`git describe --tags --always $(git rev-list --tags --max-count=1000) | grep -e "[0-9]\+\.[0-9]\+\.[0-9]\+$"`
returns 
```
0.9.0
0.8.1
0.8.0
0.7.0
0.6.0
0.5.1
0.5.0
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.2.1
0.2.0
0.1.0
```

* move to data

* use data branch for lists

* Change descrription

* remove examples

* format

* pipeline updates

* fix custom

* Simplify migration

* add restart steps

* Don't return to settings for HACS

* Fix ref

* Change dev mode

* Fix download issue for plugins

* I have no clue what this does
  • Loading branch information
fananchonun committed Sep 25, 2021
1 parent fcfad44 commit fda2e89
Show file tree
Hide file tree
Showing 36 changed files with 352 additions and 244 deletions.
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Issues not containing the minimum requirements will be closed:
-->

## Version of HACS

<!-- If you are not using the newest version, download and try that before opening an issue
If you are unsure about the version check the "SETTINGS" tab.
-->
Expand All @@ -25,9 +26,7 @@ A clear and concise description of what the bug is.

## Debug log

<!-- To enable debug logs check this https://www.home-assistant.io/components/logger/
You can get the log by clicking the "OPEN LOG" button under the "SETTINGS" tab.
-->
<!-- To enable debug logs check this https://www.home-assistant.io/components/logger/ -->

```text
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
site
site
.pytest*
__pycache__
4 changes: 4 additions & 0 deletions .pipelines/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
trigger:
branches:
include:
- master
- next
paths:
include:
- docs/*
Expand Down
5 changes: 4 additions & 1 deletion .pipelines/load_hacs_35.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
trigger:
- "*"
branches:
include:
- master
- next

pool:
vmImage: 'ubuntu-16.04'
Expand Down
5 changes: 4 additions & 1 deletion .pipelines/load_hacs_36.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
trigger:
- "*"
branches:
include:
- master
- next

pool:
vmImage: 'ubuntu-16.04'
Expand Down
5 changes: 4 additions & 1 deletion .pipelines/load_hacs_37.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
trigger:
- "*"
branches:
include:
- master
- next

pool:
vmImage: 'ubuntu-16.04'
Expand Down
25 changes: 25 additions & 0 deletions .pipelines/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
trigger:
branches:
include:
- master
- next

pool:
vmImage: 'ubuntu-16.04'

steps:
- task: UsePythonVersion@0
displayName: 'Set 3.7.x as Python version'
inputs:
versionSpec: '3.7.x'

- script: python3 -m pip install --upgrade pip setuptools wheel
displayName: 'Install tools'

- script: |
python3 -m pip install homeassistant
python3 -m pip install -r requirements.txt
displayName: 'Install dependencies'
- script: "python3 -m pytest"
displayName: 'Run PyTest'
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ HACS is a component that gives the user a powerful UI to handle downloads of cus

**Highlights of what HACS can do:**

- Help you discover new integrations and plugins.
- Help you install (download) new integrations and plugins.
- Help you keep track of your integrations and plugins.
- Help you discover new custom elements.
- Help you install (download) new custom elements.
- Help you keep track of your custom elements.
- Manage(Install/Upgrade/Remove)
- Shortcuts to repositories/issue tracker

Expand Down
6 changes: 3 additions & 3 deletions custom_components/hacs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
ELEMENT_TYPES,
VERSION,
IFRAME,
BLACKLIST,
)

from .frontend.views import (
Expand All @@ -47,7 +46,7 @@
DOMAIN = "{}".format(NAME_SHORT.lower())

# TODO: Remove this when minimum HA version is > 0.93
REQUIREMENTS = ["aiofiles", "backoff"]
REQUIREMENTS = ["aiofiles==0.4.0", "backoff==1.8.0", "packaging==19.0"]

_LOGGER = logging.getLogger("custom_components.hacs")

Expand Down Expand Up @@ -156,6 +155,7 @@ async def configure_hacs(hass, github_token, hass_config_dir):
github_token, hass.loop, async_create_clientsession(hass)
)

hacs.hacs_github = await hacs.aiogithub.get_repo("custom-components/hacs")

hacs.hass = hass
hacs.config_dir = hass_config_dir
hacs.blacklist = BLACKLIST
6 changes: 3 additions & 3 deletions custom_components/hacs/aiogithub.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Async Github API implementation."""
# pylint: disable=super-init-not-called,missing-docstring,invalid-name
# pylint: disable=super-init-not-called,missing-docstring,invalid-name,redefined-builtin
import base64
import logging
from asyncio import CancelledError
from asyncio import CancelledError, TimeoutError
from datetime import datetime

import async_timeout
Expand Down Expand Up @@ -186,7 +186,7 @@ async def get_contents(self, path, ref=None):

params = {"path": path}
if ref is not None:
params["ref"] = ref
params["ref"] = ref.replace("tags/", "")

async with async_timeout.timeout(20, loop=self.loop):
response = await self.session.get(url, headers=self.headers, params=params)
Expand Down
61 changes: 5 additions & 56 deletions custom_components/hacs/const.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Constants for HACS"""
VERSION = "0.9.0"
VERSION = "DEV"
NAME_LONG = "HACS (Home Assistant Community Store)"
NAME_SHORT = "HACS"
STORAGE_VERSION = "2"
STORAGE_VERSION = "3"
STORENAME = "hacs"
PROJECT_URL = "https://github.com/custom-components/hacs/"
CUSTOM_UPDATER_LOCATIONS = [
Expand All @@ -12,15 +12,7 @@
GENERIC_ERROR = "Possible error codes: 1D10T, PICNIC, B0110CK5."
ISSUE_URL = "{}issues".format(PROJECT_URL)
DOMAIN_DATA = "{}_data".format(NAME_SHORT.lower())
BLACKLIST = [
"custom-cards/boilerplate-card",
"custom-cards/custom-card-helpers",
"custom-cards/information",
"custom-cards/tracker-card",
"custom-components/blueprint",
"custom-components/information",
"custom-components/custom_updater",
]

ELEMENT_TYPES = ["integration", "plugin"]
IFRAME = {
"title": "Community",
Expand All @@ -37,6 +29,8 @@
To use this you need to remove custom_updater form {}
"""

NOT_SUPPORTED_HA_VERSION = "You have version '{}' of Home Assistant, but version '{}' of '{}' require version '{}' of Home Assistant, install and upgrades are disabled for this integration untill you upgrade Home Assistant."

STARTUP = """
-------------------------------------------------------------------
{}
Expand Down Expand Up @@ -66,48 +60,3 @@
"If we knew what it was we were doing, it would not be called research, would it?",
"Wait a minute, Doc. Ah… Are you telling me you built a time machine… out of a DeLorean?",
]


################################
## Extra default repositories #
################################

DEFAULT_REPOSITORIES = {
"appdaemon": [
"apop880/SmartThings-Button",
"apop880/White-Noise",
"apop880/Night-Mode",
],
"integration": [
"StyraHem/ShellyForHASS",
"isabellaalstrom/sensor.krisinformation",
"JurajNyiri/HomeAssistant-Tavos",
"JurajNyiri/HomeAssistant-Atrea",
"TimSoethout/goodwe-sems-home-assistant",
"bramkragten/lyric",
"bramkragten/mind",
"bouwew/sems2mqtt",
],
"plugin": [
"maykar/compact-custom-header",
"maykar/lovelace-swipe-navigation",
"peternijssen/lovelace-postnl-card",
"nervetattoo/simple-thermostat",
"nervetattoo/banner-card",
"kalkih/mini-media-player",
"kalkih/mini-graph-card",
"finity69x2/fan-control-entity-row",
"thomasloven/lovelace-card-mod",
"thomasloven/lovelace-markdown-mod",
"thomasloven/lovelace-slider-entity-row",
"thomasloven/lovelace-fold-entity-row",
"isabellaalstrom/krisinfo-card",
"tcarlsen/lovelace-light-with-profiles",
"atomic7777/atomic_calendar",
"bramkragten/weather-card",
"bramkragten/swipe-card",
"CyrisXD/love-lock-card",
],
"python_script": [],
"theme": [],
}
14 changes: 14 additions & 0 deletions custom_components/hacs/frontend/elements/hacs.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@
grid-gap: 10px;
}

.hacs-grid-badge {
float: right;
transform: rotate(45deg);
font-size: 12px;
width: 50px;
text-align: center;
transform-origin: 50px 37px;
}

.hacs-table-badge {
margin-left: 5px;
font-size: 12px;
}

.hacs-overview-container {
width: 95%;
margin-left: 2.5%;
Expand Down
9 changes: 0 additions & 9 deletions custom_components/hacs/frontend/views/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ async def get(
repository = self.repositories[action]
await repository.install()
await self.storage.set()
if action == "172733314":
raise web.HTTPFound(self.url_path["settings"])
raise web.HTTPFound(
"{}/{}".format(self.url_path["repository"], repository.repository_id)
)
Expand Down Expand Up @@ -126,13 +124,6 @@ async def get(
jsons[repository.repository_id][item] = var[item]
return self.json(jsons)

elif element == "log" and action == "get":
from ...handler.log import get_log_file_content

content = self.base_content
content += await get_log_file_content(self.config_dir)
return web.Response(body=content, content_type="text/html", charset="utf-8")

raise web.HTTPFound(self.url_path["error"])

async def post(
Expand Down
Loading

0 comments on commit fda2e89

Please sign in to comment.