Skip to content

Commit

Permalink
Merge branch 'release/v2.0.15'
Browse files Browse the repository at this point in the history
  • Loading branch information
Limych committed Sep 13, 2020
2 parents 533d8ee + 4eedd6f commit 354f83d
Show file tree
Hide file tree
Showing 12 changed files with 142 additions and 196 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/semantic_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: semantic_release

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
with:
ref: master
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install python-semantic-release
- name: Setup Git
run: |
git config --global user.name "semantic-release"
git config --global user.email "semantic-release@GitHub"
- name: Publish with semantic-release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
DEBUG='*' semantic-release publish
# Pack the ha-gismeteo dir as a zip and upload to the release
- name: Zip gismeteo dir
run: |
cd /home/runner/work/ha-gismeteo/ha-gismeteo/custom_components/gismeteo
zip gismeteo.zip -r ./
- name: Set release variable
run: |
echo "::set-env name=release_version::`git describe --abbrev=0`"
- name: Sleep
# add delay so upload does not kill the release notes from semantic-release
run: |
sleep 5
- name: Upload zip to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /home/runner/work/ha-gismeteo/ha-gismeteo/custom_components/gismeteo/gismeteo.zip
asset_name: gismeteo.zip
tag: ${{ env.release_version }}
overwrite: true
8 changes: 0 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ repos:
- id: no-commit-to-branch
args:
- --branch=master
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.23.0
hooks:
- id: yamllint
- repo: local
hooks:
# Run mypy through our wrapper script in order to get the possible
Expand All @@ -47,10 +43,6 @@ repos:
types: [python]
require_serial: true
files: ^custom_components/.+\.py$
- id: update-tracker
name: "Update Tracker"
entry: script/update_tracker.py
language: system
- id: pylint
name: pylint
entry: python3 -m pylint.__main__
Expand Down
43 changes: 16 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ I put a lot of work into making this repo and component available and updated to
_(string) (Optional)_\
Name to use in the frontend.\
_Default value: Gismeteo_
**mode:**\
_(string) (Optional)_\
Can specify `hourly` or `daily`. Select `hourly` for a three-hour forecast, `daily` for daily forecast.\
_Default value: `hourly`_

**latitude:**\
_(float) (Optional)_\
Latitude of the location to display the weather.\
Expand Down Expand Up @@ -115,46 +115,46 @@ I put a lot of work into making this repo and component available and updated to
_(string) (Optional)_\
Additional name for the sensors. Default to platform name.\
_Default value: Gismeteo_

**forecast:**\
_(boolean) (Optional)_\
Enables the forecast. The default is to display the current conditions.\
_Default value: false_

**monitored_conditions:**\
_(list) (Required)_\
Conditions to display in the frontend.

> **weather**\
> A human-readable text summary.
>
>
> **temperature**\
> The current temperature.
>
>
> **wind_speed**\
> The wind speed.
>
>
> **wind_bearing**\
> The wind bearing.
>
>
> **humidity**\
> The relative humidity.
>
>
> **pressure**\
> The sea-level air pressure in millibars.
>
>
> **clouds**\
> Description about cloud coverage.
>
>
> **rain**\
> The rain volume.
>
>
> **snow**\
> The snow volume.
>
>
> **storm**\
> The storm prediction.
>
>
> **geomagnetic**\
> The geomagnetic field value:\
> 1 = No noticeable geomagnetic disturbance\
Expand All @@ -168,18 +168,7 @@ I put a lot of work into making this repo and component available and updated to

## Track updates

You can automatically track new versions of this component and update it by [custom-updater](https://github.com/custom-components/custom_updater) (deprecated) or [HACS][hacs].

For custom-updater to initiate tracking add this lines to you `configuration.yaml` file:

```yaml
# Example configuration.yaml entry
custom_updater:
track:
- components
component_urls:
- https://raw.githubusercontent.com/Limych/ha-gismeteo/master/tracker.json
```
You can automatically track new versions of this component and update it by [HACS][hacs].

[forum-support]: https://community.home-assistant.io/t/gismeteo-weather-provider/109668
[hacs]: https://github.com/custom-components/hacs
10 changes: 7 additions & 3 deletions custom_components/gismeteo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@
BASE_URL,
MMHG2HPA,
MS2KMH,
VERSION,
ISSUE_URL,
DOMAIN,
)

try:
Expand All @@ -74,6 +71,13 @@
_LOGGER = logging.getLogger(__name__)


# Base component constants
DOMAIN = "gismeteo"
VERSION = '2.0.15'
ISSUE_URL = "https://github.com/Limych/ha-gismeteo/issues"
ATTRIBUTION = "Data provided by Gismeteo"


# pylint: disable=unused-argument
def setup(hass, config):
"""Set up component."""
Expand Down
6 changes: 0 additions & 6 deletions custom_components/gismeteo/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@

from homeassistant.components.weather import ATTR_FORECAST_CONDITION

# Base component constants
DOMAIN = "gismeteo"
VERSION = "2.0.14"
ISSUE_URL = "https://github.com/Limych/ha-gismeteo/issues"
ATTRIBUTION = "Data provided by Gismeteo"

BASE_URL = "https://services.gismeteo.ru/inform-service/inf_chrome"

MMHG2HPA = 1.333223684
Expand Down
3 changes: 1 addition & 2 deletions custom_components/gismeteo/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.storage import STORAGE_DIR

from . import Gismeteo
from . import Gismeteo, ATTRIBUTION
from .const import (
ATTRIBUTION,
DEFAULT_NAME,
MIN_TIME_BETWEEN_UPDATES,
CONF_CACHE_DIR,
Expand Down
3 changes: 1 addition & 2 deletions custom_components/gismeteo/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.storage import STORAGE_DIR

from . import Gismeteo
from . import Gismeteo, ATTRIBUTION
from .const import (
ATTRIBUTION,
DEFAULT_NAME,
MIN_TIME_BETWEEN_UPDATES,
CONF_CACHE_DIR,
Expand Down
2 changes: 1 addition & 1 deletion script/dev-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ die() {



ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." >/dev/null 2>&1 && pwd )"
ROOT="$( cd "$( dirname "$(readlink -f "$0")" )/.." >/dev/null 2>&1 && pwd )"

HASSIO_CONFIG="${ROOT}/dev-config"

Expand Down
102 changes: 0 additions & 102 deletions script/update_tracker.py

This file was deleted.

Loading

0 comments on commit 354f83d

Please sign in to comment.