Skip to content

Commit e307b30

Browse files
authored
Merge pull request #245 from plugwise/0_25_11
Plugwise v0.25.11
2 parents 0da50f9 + b0fb165 commit e307b30

File tree

16 files changed

+184
-2977
lines changed

16 files changed

+184
-2977
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ repos:
1616
args:
1717
- --branch=main
1818
- repo: https://github.com/asottile/pyupgrade
19-
rev: v2.32.0
19+
rev: v3.1.0
2020
hooks:
2121
- id: pyupgrade
2222
args: [--py39-plus]
2323
- repo: https://github.com/psf/black
24-
rev: 22.3.0
24+
rev: 22.10.0
2525
hooks:
2626
- id: black
2727
args:
@@ -37,7 +37,7 @@ repos:
3737
- --skip="./.*,*.csv,*.json"
3838
- --quiet-level=2
3939
exclude_types: [csv, json]
40-
- repo: https://gitlab.com/pycqa/flake8
40+
- repo: https://github.com/PyCQA/flake8
4141
rev: 4.0.1
4242
hooks:
4343
- id: flake8
@@ -46,8 +46,8 @@ repos:
4646
- pyflakes==2.4.0
4747
- flake8-docstrings==1.6.0
4848
- pydocstyle==6.1.1
49-
- flake8-comprehensions==3.8.0
50-
- flake8-noqa==1.2.1
49+
- flake8-comprehensions==3.10.0
50+
- flake8-noqa==1.2.8
5151
- mccabe==0.6.1
5252
files: ^(plugwise|tests)/.+\.py$
5353
- repo: https://github.com/PyCQA/bandit
@@ -60,15 +60,15 @@ repos:
6060
- --configfile=tests/bandit.yaml
6161
files: ^(plugwise|tests)/.+\.py$
6262
- repo: https://github.com/adrienverge/yamllint.git
63-
rev: v1.26.3
63+
rev: v1.28.0
6464
hooks:
6565
- id: yamllint
6666
- repo: https://github.com/pre-commit/mirrors-prettier
67-
rev: v2.6.2
67+
rev: v2.7.1
6868
hooks:
6969
- id: prettier
7070
- repo: https://github.com/cdce8p/python-typing-update
71-
rev: v0.3.5
71+
rev: v0.5.0
7272
hooks:
7373
# Run `python-typing-update` hook manually from time to time
7474
# to update python typing syntax.

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
# v0.25.11: Improve/change contents building on v0.25.10
4+
- Revert: Improve handling of xml-data missing, raise exception with warning; the reason for adding this fix is not clear. Needs further investigation.
5+
- Remove raising of InvalidSetupError, no longer needed; handled in Plugwise config_flow (function added by Frenck)
6+
- Simplify logic calling _power_data_from_location() (similar to v0.21.4); possible solution for https://github.com/home-assistant/core/issues/81672
7+
- _full_update_device(): revert back to v0.21.4 logic
8+
- async_update(): not needed to refresh self._modules
9+
- Add fix for Core #81712
10+
311
# v0.25.10: Thermostats: more improvements
412
- Anna + Elga: hide cooling_enable switch, (hardware-)switch is on Elga, not in Plugwise App
513
- Adam: improve collecting regulation_mode-related data. Fix for https://github.com/plugwise/python-plugwise/issues/240

plugwise/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Plugwise module."""
22

3-
__version__ = "0.25.10"
3+
__version__ = "0.25.11"
44

55
from plugwise.smile import Smile
66
from plugwise.stick import Stick

plugwise/helper.py

Lines changed: 84 additions & 106 deletions
Large diffs are not rendered by default.

plugwise/smile.py

Lines changed: 59 additions & 79 deletions
Large diffs are not rendered by default.

tests/test_smile.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5053,20 +5053,6 @@ async def test_connect_p1v4(self):
50535053
await smile.close_connection()
50545054
await self.disconnect(server, client)
50555055

5056-
@pytest.mark.asyncio
5057-
async def test_connect_p1v4_missing_logs(self):
5058-
"""Test a P1 firmware 4 setup."""
5059-
testdata = {}
5060-
self.smile_setup = "p1v4_missing_logs"
5061-
server, smile, client = await self.connect_wrapper()
5062-
try:
5063-
await self.device_test(smile, testdata)
5064-
except pw_exceptions.XMLDataMissingError:
5065-
_LOGGER.info("Passed XML data missing testcase.")
5066-
5067-
await smile.close_connection()
5068-
await self.disconnect(server, client)
5069-
50705056
@pytest.mark.asyncio
50715057
async def test_fail_legacy_system(self):
50725058
"""Test erroneous legacy stretch system."""
@@ -5077,16 +5063,6 @@ async def test_fail_legacy_system(self):
50775063
except pw_exceptions.InvalidXMLError:
50785064
assert True
50795065

5080-
@pytest.mark.asyncio
5081-
async def test_fail_anna_connected_to_adam(self):
5082-
"""Test erroneous adam with anna system."""
5083-
self.smile_setup = "anna_connected_to_adam"
5084-
try:
5085-
_server, _smile, _client = await self.connect_wrapper()
5086-
assert False # pragma: no cover
5087-
except pw_exceptions.InvalidSetupError:
5088-
assert True
5089-
50905066
@pytest.mark.asyncio
50915067
async def test_invalid_credentials(self):
50925068
"""Test P1 with invalid credentials setup."""

userdata/adam_plus_anna/core.appliances.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<appliances>
3+
<appliance id='d440da497ab549dfb7e76bcf4827f388'>
4+
<name>OpenThermThermostat</name>
5+
<description>A Thermostat</description>
6+
<type>thermostat</type>
7+
<created_date>2020-06-03T00:26:51.308+02:00</created_date>
8+
<modified_date>2020-07-31T16:04:57.153+02:00</modified_date>
9+
<deleted_date></deleted_date>
10+
<location id='c3807baa2be64289a6e8d0f64468bdad'/>
11+
<groups/>
12+
<logs>
13+
<point_log id='2c4226827eae48559a697bb343f72b8a'>
14+
<type>maximum_modulation_level</type>
15+
<unit></unit>
16+
<updated_date>2020-07-31T08:12:56.454+02:00</updated_date>
17+
<last_consecutive_log_date>2020-06-03T00:27:08.401+02:00</last_consecutive_log_date>
18+
<interval/>
19+
<modulation_level id='f50ac168cc0a462b952c07bd0256f434'/>
20+
<period start_date="2020-07-31T08:12:56.454+02:00" end_date="2020-07-31T08:12:56.454+02:00">
21+
<measurement log_date="2020-07-31T08:12:56.454+02:00">1.00</measurement>
22+
</period>
23+
</point_log>
24+
</logs>
25+
<actuator_functionalities/>
26+
</appliance>
327
<appliance id='2743216f626f43948deec1f7ab3b3d70'>
428
<name>Central heating boiler</name>
529
<description></description>

0 commit comments

Comments
 (0)