Skip to content

Commit

Permalink
Add const for temp step.
Browse files Browse the repository at this point in the history
  • Loading branch information
denpamusic committed Jun 17, 2024
1 parent dc78d95 commit 88b491d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/plum_ecomax/water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
from . import PlumEcomaxConfigEntry
from .entity import EcomaxEntity, EcomaxEntityDescription

TEMPERATURE_STEP: Final = 1

EM_TO_HA_STATE: Final = {0: STATE_OFF, 1: STATE_PERFORMANCE, 2: STATE_ECO}
HA_TO_EM_STATE: Final = {v: k for k, v in EM_TO_HA_STATE.items()}

Expand All @@ -52,7 +54,7 @@ class EcomaxWaterHeaterEntityDescription(
class EcomaxWaterHeater(EcomaxEntity, WaterHeaterEntity):
"""Represents an ecoMAX water heater."""

_attr_extra_state_attributes = {ATTR_TARGET_TEMP_STEP: 1}
_attr_extra_state_attributes = {ATTR_TARGET_TEMP_STEP: TEMPERATURE_STEP}
_attr_hysteresis = 0
_attr_operation_list = list(HA_TO_EM_STATE)
_attr_precision = PRECISION_TENTHS
Expand Down

0 comments on commit 88b491d

Please sign in to comment.