Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: Test with HA-core

env:
CACHE_VERSION: 9
CACHE_VERSION: 18
DEFAULT_PYTHON: "3.11"

on:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ repos:
hooks:
- id: pyupgrade
name: "Checking pyupgrade"
args: [--py39-plus]
args: [--py311-plus]
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
Expand Down Expand Up @@ -82,7 +82,7 @@ repos:
name: "Verifying code for typing-update"
stages: [manual]
args:
- --py39-plus
- --py311-plus
- --force
- --keep-updates
files: ^(custom_components|tests)/.+\.py$
Expand Down
42 changes: 23 additions & 19 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,48 @@

## Versions from 0.40 and up

### Ongoing
### v0.41.2

- Fix logging, line up for all platforms
- More lining up with Core Plugwise, quality improvements
- Test both versus core#dev- and core#master-branches
- Link to [plugwise v0.32.1](https://github.com/plugwise/python-plugwise/releases/tag/v0.32.1)
- Remove python3.9 compatibility: remove/replace all python3.9 references.
- Implement Ruff sorting fixes - tnx @CoMPaTech for achieving the line-up with the Core Plugwise code.
- Update p1v4_442_triple testfixture, adding a Plugwise notification for the Smile P1. Add a related testcase.
- Fix logging, line up for all platforms.
- More lining up with Core Plugwise, quality improvements.
- Test both versus core#dev- and core#master-branches.

### v0.41.1

- Line up with the latest Core Plugwise code
- Line up with the latest Core Plugwise code.

### v0.41.0

- New Feature: add a temperature_offset Number for devices that support this function, via [plugwise v0.32.0](https://github.com/plugwise/python-plugwise/releases/tag/v0.32.0)
- Correct the unit_of_measurement for the temperature_difference sensor
- Correct the unit_of_measurement for the temperature_difference sensor.

### v0.40.6

- Typing improvements via [plugwise v0.31.9](https://github.com/plugwise/python-plugwise/releases/tag/v0.31.9)
- Update fixtures and testfiles related to the updated plugwise backend version
- Update fixtures and testfiles related to the updated plugwise backend version.
- Update and simplify number.py and select.py
- Add services entry to strings.json and translation files
- Add services entry to strings.json and translation files.

### v0.40.5

- Backend improvements via [plugwise v0.31.8](https://github.com/plugwise/python-plugwise/releases/tag/v0.31.8),
adapt to relevant changes as suggested in Core PR #[96915](https://github.com/home-assistant/core/pull/96915#discussion_r1269292691)
- Backend improvements via [plugwise v0.31.7](https://github.com/plugwise/python-plugwise/releases/tag/v0.31.7), adapt to relevant changes
- Backend improvements via [plugwise v0.31.7](https://github.com/plugwise/python-plugwise/releases/tag/v0.31.7), adapt to relevant changes.
- Implement improvements from PR's #93416, #96915
- Update anna_heatpump_heating test-fixture, update related test-function
- Update anna_heatpump_heating test-fixture, update related test-function.

### v0.40.4

- Fix for [#417](https://github.com/plugwise/plugwise-beta/pull/424)
- Rename Jip sensor `relative_humidity` to `humidity` and migrate the unique_id
- Rename Jip sensor `relative_humidity` to `humidity` and migrate the unique_id.

### v0.40.3

- CI improvements, ruff over pylint, adhere to upstream ruff version
- CI improvements, ruff over pylint, adhere to upstream ruff version.
- Fix Anna+Elga domestic_hot_water_setpoint-related bug via [plugwise v0.31.6](https://github.com/plugwise/python-plugwise/releases/tag/v0.31.6)
- Cooling-related fix/improvements via [plugwise v0.31.5](https://github.com/plugwise/python-plugwise/releases/tag/v0.31.5)
- Improvements via [plugwise v0.31.4](https://github.com/plugwise/python-plugwise/releases/tag/v0.31.4)
Expand All @@ -49,16 +53,16 @@

- CI improvements
- Implement strict typing, also via [plugwise v0.31.3](https://github.com/plugwise/python-plugwise/releases/tag/v0.31.3)
- Dynamic generated fixtures re-introduced
- Dynamic generated fixtures re-introduced.

### 0.40.1

- Smile(/Stretch) custom_component only - USB split off to [plugwise_usb-beta](https://github.com/plugwise/plugwise_usb-beta)

### 0.40.0

- More formal Split between Networked and USB code
- Refactoring where necessary
- More formal Split between Networked and USB code.
- Refactoring where necessary.

## Versions from 0.30 and up

Expand All @@ -77,10 +81,10 @@

- Attempt to fix for reported Plugwise-Beta issue #347 - via plugwise [v0.27.8](https://github.com/plugwise/python-plugwise/releases/tag/v0.27.8)
- Fix for #368 - via plugwise [v0.27.9](https://github.com/plugwise/python-plugwise/releases/tag/v0.27.0)
- Fix for #369
- Added pre-commit and additional linting (no or marginal code changes)
- Added tagging in #361 to enable a path forward for upstreaming (mostly isort and tagging, no or marginal code changes)
- Replaceing flake8 linting with ruff as per upstream
- Fix for #369.
- Added pre-commit and additional linting (no or marginal code changes).
- Added tagging in #361 to enable a path forward for upstreaming (mostly isort and tagging, no or marginal code changes).
- Replaceing flake8 linting with ruff as per upstream.

### FEB 2023 [0.34.7.1] Stick-bugfix, rename P1 gas-interval sensor, line up with Core Plugwise

Expand Down
2 changes: 1 addition & 1 deletion custom_components/plugwise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

from typing import Any

from plugwise.exceptions import PlugwiseError
import voluptuous as vol

from homeassistant.config_entries import ConfigEntry
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant, ServiceCall, callback
from homeassistant.helpers import device_registry as dr, entity_registry as er
from plugwise.exceptions import PlugwiseError

from .const import (
CONF_REFRESH_INTERVAL, # pw-beta options
Expand Down
3 changes: 2 additions & 1 deletion custom_components/plugwise/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from dataclasses import dataclass
from typing import Any

from plugwise.constants import BinarySensorType

from homeassistant.components.binary_sensor import (
BinarySensorEntity,
BinarySensorEntityDescription,
Expand All @@ -13,7 +15,6 @@
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from plugwise.constants import BinarySensorType

from .const import (
COORDINATOR, # pw-beta
Expand Down
18 changes: 9 additions & 9 deletions custom_components/plugwise/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
import datetime as dt # pw-beta options
from typing import Any

from plugwise import Smile
from plugwise.exceptions import (
ConnectionFailedError,
InvalidAuthentication,
InvalidSetupError,
InvalidXMLError,
ResponseError,
UnsupportedDeviceError,
)
import voluptuous as vol

from homeassistant import config_entries
Expand All @@ -22,15 +31,6 @@
from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from plugwise import Smile
from plugwise.exceptions import (
ConnectionFailedError,
InvalidAuthentication,
InvalidSetupError,
InvalidXMLError,
ResponseError,
UnsupportedDeviceError,
)

from .const import (
CONF_HOMEKIT_EMULATION, # pw-beta option
Expand Down
17 changes: 9 additions & 8 deletions custom_components/plugwise/coordinator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
"""DataUpdateCoordinator for Plugwise."""
from datetime import timedelta

from plugwise import PlugwiseData, Smile
from plugwise.exceptions import (
ConnectionFailedError,
InvalidAuthentication,
InvalidXMLError,
ResponseError,
UnsupportedDeviceError,
)

from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
CONF_HOST,
Expand All @@ -14,14 +23,6 @@
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.debounce import Debouncer
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from plugwise import PlugwiseData, Smile
from plugwise.exceptions import (
ConnectionFailedError,
InvalidAuthentication,
InvalidXMLError,
ResponseError,
UnsupportedDeviceError,
)

from .const import DEFAULT_PORT, DEFAULT_SCAN_INTERVAL, DEFAULT_USERNAME, DOMAIN, LOGGER

Expand Down
3 changes: 2 additions & 1 deletion custom_components/plugwise/entity.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
"""Generic Plugwise Entity Class."""
from __future__ import annotations

from plugwise.constants import DeviceData

from homeassistant.const import ATTR_NAME, ATTR_VIA_DEVICE, CONF_HOST
from homeassistant.helpers.device_registry import (
CONNECTION_NETWORK_MAC,
CONNECTION_ZIGBEE,
)
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from plugwise.constants import DeviceData

from .const import DOMAIN
from .coordinator import PlugwiseDataUpdateCoordinator
Expand Down
4 changes: 2 additions & 2 deletions custom_components/plugwise/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"integration_type": "hub",
"iot_class": "local_polling",
"loggers": ["plugwise"],
"requirements": ["plugwise==0.32.0"],
"version": "0.41.1"
"requirements": ["plugwise==0.32.1"],
"version": "0.41.2"
}
5 changes: 3 additions & 2 deletions custom_components/plugwise/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
from collections.abc import Awaitable, Callable
from dataclasses import dataclass

from plugwise import Smile
from plugwise.constants import NumberType

from homeassistant.components.number import (
NumberDeviceClass,
NumberEntity,
Expand All @@ -14,8 +17,6 @@
from homeassistant.const import EntityCategory, UnitOfTemperature
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from plugwise import Smile
from plugwise.constants import NumberType

from .const import (
COORDINATOR, # pw-beta
Expand Down
5 changes: 3 additions & 2 deletions custom_components/plugwise/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
from collections.abc import Awaitable, Callable
from dataclasses import dataclass

from plugwise import Smile
from plugwise.constants import SelectOptionsType, SelectType

from homeassistant.components.select import SelectEntity, SelectEntityDescription
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import STATE_ON, EntityCategory
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from plugwise import Smile
from plugwise.constants import SelectOptionsType, SelectType

from .const import (
COORDINATOR, # pw-beta
Expand Down
3 changes: 2 additions & 1 deletion custom_components/plugwise/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

from dataclasses import dataclass

from plugwise.constants import SensorType

from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
Expand All @@ -24,7 +26,6 @@
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from plugwise.constants import SensorType

from .const import (
COORDINATOR, # pw-beta
Expand Down
3 changes: 2 additions & 1 deletion custom_components/plugwise/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from dataclasses import dataclass
from typing import Any

from plugwise.constants import SwitchType

from homeassistant.components.switch import (
SwitchDeviceClass,
SwitchEntity,
Expand All @@ -13,7 +15,6 @@
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from plugwise.constants import SwitchType

from .const import (
COORDINATOR, # pw-beta
Expand Down
3 changes: 2 additions & 1 deletion custom_components/plugwise/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
from collections.abc import Awaitable, Callable, Coroutine
from typing import Any, Concatenate, ParamSpec, TypeVar

from homeassistant.exceptions import HomeAssistantError
from plugwise.exceptions import PlugwiseException

from homeassistant.exceptions import HomeAssistantError

from .entity import PlugwiseEntity

_PlugwiseEntityT = TypeVar("_PlugwiseEntityT", bound=PlugwiseEntity)
Expand Down
Loading