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: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

## v0.31.8: Improve typing as per Core PR #96915

## v0.31.7: Various small updates

- Repair coverage/fix testing - #294
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"package.json": "^2.0.1",
"prettier": "^3.0.0-alpha.9-for-vscode"
"package.json": "^0.0.0",
"prettier": "^3.0.0"
}
}
17 changes: 10 additions & 7 deletions plugwise/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from dataclasses import dataclass
import datetime as dt
import logging
from typing import Final, TypedDict
from typing import Final, Literal, TypedDict, get_args

LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -246,7 +246,7 @@

# All available Binary Sensor, Sensor, and Switch Types

BINARY_SENSORS: Final[tuple[str, ...]] = (
BinarySensorType = Literal[
"cooling_enabled",
"compressor_state",
"cooling_state",
Expand All @@ -255,9 +255,10 @@
"heating_state",
"plugwise_notification",
"slave_boiler_state",
)
]
BINARY_SENSORS: Final[tuple[str, ...]] = get_args(BinarySensorType)

SENSORS: Final[tuple[str, ...]] = (
SensorType = Literal[
"battery",
"cooling_activation_outdoor_temperature",
"cooling_deactivation_threshold",
Expand Down Expand Up @@ -309,14 +310,16 @@
"voltage_phase_three",
"water_pressure",
"water_temperature",
)
]
SENSORS: Final[tuple[str, ...]] = get_args(SensorType)

SWITCHES: Final[tuple[str, ...]] = (
SwitchType = Literal[
"cooling_ena_switch",
"dhw_cm_switch",
"lock",
"relay",
)
]
SWITCHES: Final[tuple[str, ...]] = get_args(SwitchType)


class ApplianceData(TypedDict, total=False):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "plugwise"
version = "0.31.7"
version = "0.31.8"
license = {file = "LICENSE"}
description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3."
readme = "README.md"
Expand Down