Skip to content

Commit 66bbccb

Browse files
authored
Merge pull request #90 from plugwise/pylint_fixes
Pylint fixes - follow up of v0.11.1b1
2 parents a545980 + e48a4b8 commit 66bbccb

File tree

8 files changed

+175
-167
lines changed

8 files changed

+175
-167
lines changed

plugwise/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Plugwise module."""
22

3-
__version__ = "0.11.0"
3+
__version__ = "0.11.1"
44

55
from plugwise.smile import Smile
6-
from plugwise.stick import stick
6+
from plugwise.stick import Stick

plugwise/entities.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
""" Plugwise Entity Classes."""
2-
import asyncio
32

43
from .constants import (
54
ATTR_ID,
@@ -12,18 +11,14 @@
1211
HVAC_MODE_HEAT_COOL,
1312
HVAC_MODE_OFF,
1413
IDLE_ICON,
15-
LOCATIONS,
1614
NO_NOTIFICATION_ICON,
1715
NOTIFICATION_ICON,
1816
PRESET_AWAY,
19-
PW_NOTIFICATION,
20-
RULES,
2117
SEVERITIES,
2218
)
23-
from .smile import Smile
2419

2520

26-
class GW_B_Sensor:
21+
class GWBinarySensor:
2722
""" Represent the Plugwise Smile/Stretch binary_sensor."""
2823

2924
def __init__(self, api, dev_id, binary_sensor):
@@ -72,11 +67,11 @@ def update_data(self):
7267
"""Handle update callbacks."""
7368
data = self._api.gw_devices[self._dev_id]
7469

75-
for key, value in data.items():
70+
for key, _ in data.items():
7671
if key != "binary_sensors":
7772
continue
7873

79-
for idx, item in enumerate(data["binary_sensors"]):
74+
for _, item in enumerate(data["binary_sensors"]):
8075
if item[ATTR_ID] != self._binary_sensor:
8176
continue
8277

@@ -86,7 +81,7 @@ def update_data(self):
8681
if self._binary_sensor != "plugwise_notification":
8782
continue
8883

89-
notify = self._api._notifications
84+
notify = self._api.notifications
9085
self._notification = {}
9186
for severity in SEVERITIES:
9287
self._attributes[f"{severity.upper()}_msg"] = []
@@ -100,7 +95,7 @@ def update_data(self):
10095
self._notification[notify_id] = f"{msg_type.title()}: {msg}"
10196

10297

103-
class GW_Thermostat:
98+
class GWThermostat:
10499
"""Represent a Plugwise Thermostat Device."""
105100

106101
def __init__(self, api, dev_id):

0 commit comments

Comments
 (0)