Skip to content

Commit fa7b301

Browse files
authored
Merge pull request #37 from lawtancool/lawtancool-fix-actions
Fix CI.yml
2 parents 43e7c1f + 7da9c9f commit fa7b301

File tree

9 files changed

+20
-40
lines changed

9 files changed

+20
-40
lines changed

.github/workflows/CI.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ jobs:
1616

1717
steps:
1818
- uses: actions/checkout@v2
19-
- name: Set up Python 3.8
20-
uses: actions/setup-python@v1
21-
with:
22-
python-version: 3.8
19+
- name: Set up Python
20+
uses: actions/[email protected]
2321
- name: Install dependencies
2422
run: |
2523
python -m pip install --upgrade pip
@@ -46,7 +44,5 @@ jobs:
4644

4745
# Runs a single command using the runners shell
4846
- name: Black Code Formatter
49-
uses: lgeiger/[email protected]
50-
with:
51-
args: "./pyControl4 --check --diff"
47+
uses: psf/black@stable
5248

pyControl4/alarm.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Controls Control4 security panel and contact sensor (door, window, motion) devices.
2-
"""
1+
"""Controls Control4 security panel and contact sensor (door, window, motion) devices."""
32

43
import json
54
from pyControl4 import C4Entity

pyControl4/blind.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Controls Control4 blind devices.
2-
"""
1+
"""Controls Control4 blind devices."""
32

43
from pyControl4 import C4Entity
54

pyControl4/climate.py

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,65 +10,55 @@ class C4Climate(C4Entity):
1010

1111
async def getHVACState(self):
1212
"""Returns the current HVAC state (e.g., on/off or active mode)."""
13-
return await self.director.getItemVariableValue(self.item_id,
14-
"HVAC_STATE")
13+
return await self.director.getItemVariableValue(self.item_id, "HVAC_STATE")
1514

1615
async def getFANState(self):
1716
"""Returns the current power state of the fan (True=on, False=off)."""
18-
return await self.director.getItemVariableValue(self.item_id,
19-
"FAN_STATE")
17+
return await self.director.getItemVariableValue(self.item_id, "FAN_STATE")
2018

2119
# ------------------------
2220
# Mode Getters
2321
# ------------------------
2422

2523
async def getHVACMode(self):
2624
"""Returns the currently active HVAC mode."""
27-
return await self.director.getItemVariableValue(self.item_id,
28-
"HVAC_MODE")
25+
return await self.director.getItemVariableValue(self.item_id, "HVAC_MODE")
2926

3027
async def getHVACModes(self):
3128
"""Returns a list of supported HVAC modes."""
32-
return await self.director.getItemVariableValue(self.item_id,
33-
"HVAC_MODES_LIST")
29+
return await self.director.getItemVariableValue(self.item_id, "HVAC_MODES_LIST")
3430

3531
async def getFANMode(self):
3632
"""Returns the currently active fan mode."""
37-
return await self.director.getItemVariableValue(self.item_id,
38-
"FAN_MODE")
33+
return await self.director.getItemVariableValue(self.item_id, "FAN_MODE")
3934

4035
async def getFANModes(self):
4136
"""Returns a list of supported fan modes."""
42-
return await self.director.getItemVariableValue(self.item_id,
43-
"FAN_MODES_LIST")
37+
return await self.director.getItemVariableValue(self.item_id, "FAN_MODES_LIST")
4438

4539
# ------------------------
4640
# Setpoint Getters
4741
# ------------------------
4842

4943
async def getCoolSetpointF(self):
5044
"""Returns the cooling setpoint temperature in Fahrenheit."""
51-
return await self.director.getItemVariableValue(self.item_id,
52-
"COOL_SETPOINT_F")
45+
return await self.director.getItemVariableValue(self.item_id, "COOL_SETPOINT_F")
5346

5447
async def getHeatSetpointF(self):
5548
"""Returns the heating setpoint temperature in Fahrenheit."""
56-
return await self.director.getItemVariableValue(self.item_id,
57-
"HEAT_SETPOINT_F")
49+
return await self.director.getItemVariableValue(self.item_id, "HEAT_SETPOINT_F")
5850

5951
# ------------------------
6052
# Sensor Readings
6153
# ------------------------
6254

6355
async def getHumidity(self):
6456
"""Returns the current humidity percentage."""
65-
return await self.director.getItemVariableValue(self.item_id,
66-
"HUMIDITY")
57+
return await self.director.getItemVariableValue(self.item_id, "HUMIDITY")
6758

6859
async def getCurrentTemperature(self):
6960
"""Returns the current ambient temperature in Fahrenheit."""
70-
return await self.director.getItemVariableValue(self.item_id,
71-
"TEMPERATURE_F")
61+
return await self.director.getItemVariableValue(self.item_id, "TEMPERATURE_F")
7262

7363
# ------------------------
7464
# Setters / Commands

pyControl4/director.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Handles communication with a Control4 Director, and provides functions for
2-
getting details about items on the Director.
2+
getting details about items on the Director.
33
"""
44

55
import aiohttp

pyControl4/fan.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ async def getSpeed(self):
3636
Returns:
3737
int: Current fan speed (0–4).
3838
"""
39-
value = await self.director.getItemVariableValue(self.item_id,
40-
"CURRENT_SPEED")
39+
value = await self.director.getItemVariableValue(self.item_id, "CURRENT_SPEED")
4140
return int(value)
4241

4342
# ------------------------

pyControl4/light.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Controls Control4 Light devices.
2-
"""
1+
"""Controls Control4 Light devices."""
32

43
from pyControl4 import C4Entity
54

pyControl4/relay.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Controls Control4 Relay devices. These can include locks, and potentially other types of devices.
2-
"""
1+
"""Controls Control4 Relay devices. These can include locks, and potentially other types of devices."""
32

43
from pyControl4 import C4Entity
54

pyControl4/room.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Controls Control4 Room devices.
2-
"""
1+
"""Controls Control4 Room devices."""
32

43
from pyControl4 import C4Entity
54

0 commit comments

Comments
 (0)