Skip to content

Commit

Permalink
Merge pull request #90 from plugwise/pylint_fixes
Browse files Browse the repository at this point in the history
Pylint fixes - follow up of v0.11.1b1
  • Loading branch information
bouwew authored Jul 2, 2021
2 parents a545980 + e48a4b8 commit 66bbccb
Show file tree
Hide file tree
Showing 8 changed files with 175 additions and 167 deletions.
4 changes: 2 additions & 2 deletions plugwise/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Plugwise module."""

__version__ = "0.11.0"
__version__ = "0.11.1"

from plugwise.smile import Smile
from plugwise.stick import stick
from plugwise.stick import Stick
15 changes: 5 additions & 10 deletions plugwise/entities.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
""" Plugwise Entity Classes."""
import asyncio

from .constants import (
ATTR_ID,
Expand All @@ -12,18 +11,14 @@
HVAC_MODE_HEAT_COOL,
HVAC_MODE_OFF,
IDLE_ICON,
LOCATIONS,
NO_NOTIFICATION_ICON,
NOTIFICATION_ICON,
PRESET_AWAY,
PW_NOTIFICATION,
RULES,
SEVERITIES,
)
from .smile import Smile


class GW_B_Sensor:
class GWBinarySensor:
""" Represent the Plugwise Smile/Stretch binary_sensor."""

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

for key, value in data.items():
for key, _ in data.items():
if key != "binary_sensors":
continue

for idx, item in enumerate(data["binary_sensors"]):
for _, item in enumerate(data["binary_sensors"]):
if item[ATTR_ID] != self._binary_sensor:
continue

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

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


class GW_Thermostat:
class GWThermostat:
"""Represent a Plugwise Thermostat Device."""

def __init__(self, api, dev_id):
Expand Down
Loading

0 comments on commit 66bbccb

Please sign in to comment.