Skip to content

Commit 354f83d

Browse files
committed
Merge branch 'release/v2.0.15'
2 parents 533d8ee + 4eedd6f commit 354f83d

File tree

12 files changed

+142
-196
lines changed

12 files changed

+142
-196
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: semantic_release
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v1
15+
with:
16+
ref: master
17+
- name: Set up Python 3.7
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: 3.7
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install python-semantic-release
25+
- name: Setup Git
26+
run: |
27+
git config --global user.name "semantic-release"
28+
git config --global user.email "semantic-release@GitHub"
29+
- name: Publish with semantic-release
30+
env:
31+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
run: |
33+
DEBUG='*' semantic-release publish
34+
# Pack the ha-gismeteo dir as a zip and upload to the release
35+
- name: Zip gismeteo dir
36+
run: |
37+
cd /home/runner/work/ha-gismeteo/ha-gismeteo/custom_components/gismeteo
38+
zip gismeteo.zip -r ./
39+
- name: Set release variable
40+
run: |
41+
echo "::set-env name=release_version::`git describe --abbrev=0`"
42+
- name: Sleep
43+
# add delay so upload does not kill the release notes from semantic-release
44+
run: |
45+
sleep 5
46+
- name: Upload zip to release
47+
uses: svenstaro/upload-release-action@v2
48+
with:
49+
repo_token: ${{ secrets.GITHUB_TOKEN }}
50+
file: /home/runner/work/ha-gismeteo/ha-gismeteo/custom_components/gismeteo/gismeteo.zip
51+
asset_name: gismeteo.zip
52+
tag: ${{ env.release_version }}
53+
overwrite: true

.pre-commit-config.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ repos:
3030
- id: no-commit-to-branch
3131
args:
3232
- --branch=master
33-
- repo: https://github.com/adrienverge/yamllint.git
34-
rev: v1.23.0
35-
hooks:
36-
- id: yamllint
3733
- repo: local
3834
hooks:
3935
# Run mypy through our wrapper script in order to get the possible
@@ -47,10 +43,6 @@ repos:
4743
types: [python]
4844
require_serial: true
4945
files: ^custom_components/.+\.py$
50-
- id: update-tracker
51-
name: "Update Tracker"
52-
entry: script/update_tracker.py
53-
language: system
5446
- id: pylint
5547
name: pylint
5648
entry: python3 -m pylint.__main__

README.md

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ I put a lot of work into making this repo and component available and updated to
6565
_(string) (Optional)_\
6666
Name to use in the frontend.\
6767
_Default value: Gismeteo_
68-
68+
6969
**mode:**\
7070
_(string) (Optional)_\
7171
Can specify `hourly` or `daily`. Select `hourly` for a three-hour forecast, `daily` for daily forecast.\
7272
_Default value: `hourly`_
73-
73+
7474
**latitude:**\
7575
_(float) (Optional)_\
7676
Latitude of the location to display the weather.\
@@ -115,46 +115,46 @@ I put a lot of work into making this repo and component available and updated to
115115
_(string) (Optional)_\
116116
Additional name for the sensors. Default to platform name.\
117117
_Default value: Gismeteo_
118-
118+
119119
**forecast:**\
120120
_(boolean) (Optional)_\
121121
Enables the forecast. The default is to display the current conditions.\
122122
_Default value: false_
123-
123+
124124
**monitored_conditions:**\
125125
_(list) (Required)_\
126126
Conditions to display in the frontend.
127-
127+
128128
> **weather**\
129129
> A human-readable text summary.
130-
>
130+
>
131131
> **temperature**\
132132
> The current temperature.
133-
>
133+
>
134134
> **wind_speed**\
135135
> The wind speed.
136-
>
136+
>
137137
> **wind_bearing**\
138138
> The wind bearing.
139-
>
139+
>
140140
> **humidity**\
141141
> The relative humidity.
142-
>
142+
>
143143
> **pressure**\
144144
> The sea-level air pressure in millibars.
145-
>
145+
>
146146
> **clouds**\
147147
> Description about cloud coverage.
148-
>
148+
>
149149
> **rain**\
150150
> The rain volume.
151-
>
151+
>
152152
> **snow**\
153153
> The snow volume.
154-
>
154+
>
155155
> **storm**\
156156
> The storm prediction.
157-
>
157+
>
158158
> **geomagnetic**\
159159
> The geomagnetic field value:\
160160
> 1 = No noticeable geomagnetic disturbance\
@@ -168,18 +168,7 @@ I put a lot of work into making this repo and component available and updated to
168168

169169
## Track updates
170170

171-
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].
172-
173-
For custom-updater to initiate tracking add this lines to you `configuration.yaml` file:
174-
175-
```yaml
176-
# Example configuration.yaml entry
177-
custom_updater:
178-
track:
179-
- components
180-
component_urls:
181-
- https://raw.githubusercontent.com/Limych/ha-gismeteo/master/tracker.json
182-
```
171+
You can automatically track new versions of this component and update it by [HACS][hacs].
183172

184173
[forum-support]: https://community.home-assistant.io/t/gismeteo-weather-provider/109668
185174
[hacs]: https://github.com/custom-components/hacs

custom_components/gismeteo/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@
6060
BASE_URL,
6161
MMHG2HPA,
6262
MS2KMH,
63-
VERSION,
64-
ISSUE_URL,
65-
DOMAIN,
6663
)
6764

6865
try:
@@ -74,6 +71,13 @@
7471
_LOGGER = logging.getLogger(__name__)
7572

7673

74+
# Base component constants
75+
DOMAIN = "gismeteo"
76+
VERSION = '2.0.15'
77+
ISSUE_URL = "https://github.com/Limych/ha-gismeteo/issues"
78+
ATTRIBUTION = "Data provided by Gismeteo"
79+
80+
7781
# pylint: disable=unused-argument
7882
def setup(hass, config):
7983
"""Set up component."""

custom_components/gismeteo/const.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@
1414

1515
from homeassistant.components.weather import ATTR_FORECAST_CONDITION
1616

17-
# Base component constants
18-
DOMAIN = "gismeteo"
19-
VERSION = "2.0.14"
20-
ISSUE_URL = "https://github.com/Limych/ha-gismeteo/issues"
21-
ATTRIBUTION = "Data provided by Gismeteo"
22-
2317
BASE_URL = "https://services.gismeteo.ru/inform-service/inf_chrome"
2418

2519
MMHG2HPA = 1.333223684

custom_components/gismeteo/sensor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@
2424
from homeassistant.helpers.entity import Entity
2525
from homeassistant.helpers.storage import STORAGE_DIR
2626

27-
from . import Gismeteo
27+
from . import Gismeteo, ATTRIBUTION
2828
from .const import (
29-
ATTRIBUTION,
3029
DEFAULT_NAME,
3130
MIN_TIME_BETWEEN_UPDATES,
3231
CONF_CACHE_DIR,

custom_components/gismeteo/weather.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@
2424
from homeassistant.helpers import config_validation as cv
2525
from homeassistant.helpers.storage import STORAGE_DIR
2626

27-
from . import Gismeteo
27+
from . import Gismeteo, ATTRIBUTION
2828
from .const import (
29-
ATTRIBUTION,
3029
DEFAULT_NAME,
3130
MIN_TIME_BETWEEN_UPDATES,
3231
CONF_CACHE_DIR,

script/dev-deploy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ die() {
3232

3333

3434

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

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

script/update_tracker.py

Lines changed: 0 additions & 102 deletions
This file was deleted.

0 commit comments

Comments
 (0)