11""" Plugwise Entity Classes."""
2- import asyncio
32
43from .constants import (
54 ATTR_ID ,
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