Skip to content

Commit bb7e0a4

Browse files
Remove HEAT custom constant (#16)
1 parent 18aff23 commit bb7e0a4

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

salusfy/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
from .state import State
44
from .web_client import (
55
WebClient,
6-
HVAC_MODE_HEAT,
7-
HVAC_MODE_OFF,
86
STATE_ON,
97
STATE_OFF
108
)

salusfy/simulator/web_client.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"""
44
import logging
55

6-
from homeassistant.components.climate.const import (
7-
HVACMode,
8-
)
6+
from homeassistant.components.climate.const import HVACMode
97

108
from .. import (
119
State,

salusfy/web_client.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99

1010
from .state import State
1111

12-
HVAC_MODE_HEAT = "heat"
13-
HVAC_MODE_OFF = "off"
12+
from homeassistant.components.climate.const import HVACMode
1413

1514
STATE_ON = "ON"
1615
STATE_OFF = "OFF"
@@ -65,9 +64,9 @@ async def set_hvac_mode(self, hvac_mode):
6564
headers = {"Content-Type": "application/x-www-form-urlencoded"}
6665

6766
auto = "1"
68-
if hvac_mode == HVAC_MODE_OFF:
67+
if hvac_mode == HVACMode.OFF:
6968
auto = "1"
70-
elif hvac_mode == HVAC_MODE_HEAT:
69+
elif hvac_mode == HVACMode.HEAT:
7170
auto = "0"
7271

7372
async with aiohttp.ClientSession() as session:

0 commit comments

Comments
 (0)