Skip to content

Commit

Permalink
Merge branch 'release/v6.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
jabesq committed Dec 17, 2021
2 parents 58ae867 + 0ce756d commit fe1602e
Show file tree
Hide file tree
Showing 9 changed files with 228 additions and 157 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
python-version: 3.8
- name: Install dependencies
Expand All @@ -24,6 +24,11 @@ jobs:
- name: Build a binary wheel and a source tarball
run: >-
python setup.py sdist bdist_wheel
- name: Publish 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_TEST_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
ref: development
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
python-version: 3.8
- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -44,7 +44,7 @@ jobs:
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -68,7 +68,7 @@ jobs:
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
python-version: ${{ matrix.python-version }}
- name: Run tests with tox
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
exclude: "external_src/int-tools"

- repo: https://github.com/asottile/add-trailing-comma
rev: v2.2.0
rev: v2.2.1
hooks:
- id: add-trailing-comma
args: [--py36-plus]
Expand All @@ -26,7 +26,7 @@ repos:
- id: yesqa

- repo: https://github.com/psf/black
rev: 21.11b1
rev: 21.12b0
hooks:
- id: black
language_version: python3
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

-

## [6.2.1]

### Fixed

- Catch when no body is contained in the response

## [6.2.0]

### Added
Expand Down Expand Up @@ -158,6 +164,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix crash when station name is not contained in the backend data

[unreleased]: https://github.com/jabesq/pyatmo/compare/v6.2.0...HEAD
[6.2.1]: https://github.com/jabesq/pyatmo/compare/v6.2.0...v6.2.1
[6.2.0]: https://github.com/jabesq/pyatmo/compare/v6.1.0...v6.2.0
[6.1.0]: https://github.com/jabesq/pyatmo/compare/v6.0.0...v6.1.0
[6.0.0]: https://github.com/jabesq/pyatmo/compare/v5.2.3...v6.0.0
Expand Down
350 changes: 205 additions & 145 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/pyatmo/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def update(self, raw_data: dict) -> None:

@dataclass
class NetatmoSchedule:
"""Class to represent a Netatmo room."""
"""Class to represent a Netatmo schedule."""

entity_id: str
name: str
Expand Down
3 changes: 1 addition & 2 deletions src/pyatmo/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def extract_raw_data(resp: Any, tag: str) -> dict:

def extract_raw_data_new(resp: Any, tag: str) -> dict:
"""Extract raw data from server response."""
errors = resp["body"].get("errors", [])
if resp is None or "body" not in resp or tag not in resp["body"]:
LOG.debug("Server response: %s", resp)
raise NoDevice("No device found, errors in response")
Expand All @@ -84,4 +83,4 @@ def extract_raw_data_new(resp: Any, tag: str) -> dict:
LOG.debug("Server response: %s", resp)
raise NoDevice("No device data available")

return {tag: raw_data, "errors": errors}
return {tag: raw_data, "errors": resp["body"].get("errors", [])}
4 changes: 2 additions & 2 deletions src/pyatmo/home_coach.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class HomeCoachData(WeatherStationData):
"""
Class of Netatmo Home Couch devices (stations and modules)
Class of Netatmo Home Coach devices (stations and modules)
"""

def __init__(self, auth: NetatmoOAuth2) -> None:
Expand All @@ -21,7 +21,7 @@ def __init__(self, auth: NetatmoOAuth2) -> None:

class AsyncHomeCoachData(AsyncWeatherStationData):
"""
Class of Netatmo Home Couch devices (stations and modules)
Class of Netatmo Home Coach devices (stations and modules)
"""

def __init__(self, auth: AbstractAsyncAuth) -> None:
Expand Down

0 comments on commit fe1602e

Please sign in to comment.