Skip to content

Commit

Permalink
Merge pull request #519 from CFenner/patch-2
Browse files Browse the repository at this point in the history
Use constants in climate entity definition
  • Loading branch information
astrandb authored Aug 6, 2024
2 parents d9ea47b + 1640684 commit e4475f3
Showing 1 changed file with 41 additions and 4 deletions.
45 changes: 41 additions & 4 deletions custom_components/miele/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,20 @@
)

from . import get_coordinator
from .const import ACTIONS, API, DOMAIN, MANUFACTURER, TARGET_TEMPERATURE
from .const import (
ACTIONS,
API,
DOMAIN,
FREEZER,
FRIDGE,
FRIDGE_FREEZER,
MANUFACTURER,
TARGET_TEMPERATURE,
WINE_CABINET,
WINE_CABINET_FREEZER,
WINE_CONDITIONING_UNIT,
WINE_STORAGE_CONDITIONING_UNIT,
)

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -57,7 +70,15 @@ class MieleClimateDefinition:

CLIMATE_TYPES: Final[tuple[MieleClimateDefinition, ...]] = (
MieleClimateDefinition(
types=[19, 20, 21, 32, 33, 34, 68],
types=[
FRIDGE,
FREEZER,
FRIDGE_FREEZER,
WINE_CABINET,
WINE_CONDITIONING_UNIT,
WINE_STORAGE_CONDITIONING_UNIT,
WINE_CABINET_FREEZER,
],
description=MieleClimateDescription(
key="thermostat",
current_temperature_tag="state|temperature|0|value_raw",
Expand All @@ -72,7 +93,15 @@ class MieleClimateDefinition:
),
),
MieleClimateDefinition(
types=[19, 20, 21, 32, 33, 34, 68],
types=[
FRIDGE,
FREEZER,
FRIDGE_FREEZER,
WINE_CABINET,
WINE_CONDITIONING_UNIT,
WINE_STORAGE_CONDITIONING_UNIT,
WINE_CABINET_FREEZER,
],
description=MieleClimateDescription(
key="thermostat",
current_temperature_tag="state|temperature|1|value_raw",
Expand All @@ -87,7 +116,15 @@ class MieleClimateDefinition:
),
),
MieleClimateDefinition(
types=[19, 20, 21, 32, 33, 34, 68],
types=[
FRIDGE,
FREEZER,
FRIDGE_FREEZER,
WINE_CABINET,
WINE_CONDITIONING_UNIT,
WINE_STORAGE_CONDITIONING_UNIT,
WINE_CABINET_FREEZER,
],
description=MieleClimateDescription(
key="thermostat",
current_temperature_tag="state|temperature|2|value_raw",
Expand Down

0 comments on commit e4475f3

Please sign in to comment.