Update docstrings (#7361)
* Update docstrings * Update docstrings * Update docstrings * Update docstrings * update docstrings * Update docstrings * Update docstrings * Update docstrings * Update docstrings * Update docstrings * Update tomato.py * Update isy994.py * Lint + fix tests * Lint
This commit is contained in:
1 parent
e22e70a01a
commit
3ee4d1060f
264 files changed
+1686
-1768
No files matched your search
@@ -20,12 +20,12 @@ DEPENDENCIES = ['vera']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
OPERATION_LIST = ["Heat", "Cool", "Auto Changeover", "Off"]
|
||||
FAN_OPERATION_LIST = ["On", "Auto", "Cycle"]
|
||||
OPERATION_LIST = ['Heat', 'Cool', 'Auto Changeover', 'Off']
|
||||
FAN_OPERATION_LIST = ['On', 'Auto', 'Cycle']
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
||||
"""Find and return Vera thermostats."""
|
||||
"""Set up of Vera thermostats."""
|
||||
add_devices_callback(
|
||||
VeraThermostat(device, VERA_CONTROLLER) for
|
||||
device in VERA_DEVICES['climate'])
|
||||
@@ -43,19 +43,19 @@ class VeraThermostat(VeraDevice, ClimateDevice):
|
||||
def current_operation(self):
|
||||
"""Return current operation ie. heat, cool, idle."""
|
||||
mode = self.vera_device.get_hvac_mode()
|
||||
if mode == "HeatOn":
|
||||
if mode == 'HeatOn':
|
||||
return OPERATION_LIST[0] # heat
|
||||
elif mode == "CoolOn":
|
||||
elif mode == 'CoolOn':
|
||||
return OPERATION_LIST[1] # cool
|
||||
elif mode == "AutoChangeOver":
|
||||
elif mode == 'AutoChangeOver':
|
||||
return OPERATION_LIST[2] # auto
|
||||
elif mode == "Off":
|
||||
elif mode == 'Off':
|
||||
return OPERATION_LIST[3] # off
|
||||
return "Off"
|
||||
return 'Off'
|
||||
|
||||
@property
|
||||
def operation_list(self):
|
||||
"""List of available operation modes."""
|
||||
"""Return the list of available operation modes."""
|
||||
return OPERATION_LIST
|
||||
|
||||
@property
|
||||
@@ -72,7 +72,7 @@ class VeraThermostat(VeraDevice, ClimateDevice):
|
||||
|
||||
@property
|
||||
def fan_list(self):
|
||||
"""List of available fan modes."""
|
||||
"""Return a list of available fan modes."""
|
||||
return FAN_OPERATION_LIST
|
||||
|
||||
def set_fan_mode(self, mode):
|
||||
@@ -86,13 +86,13 @@ class VeraThermostat(VeraDevice, ClimateDevice):
|
||||
|
||||
@property
|
||||
def current_power_w(self):
|
||||
"""Current power usage in W."""
|
||||
"""Return the current power usage in W."""
|
||||
power = self.vera_device.power
|
||||
if power:
|
||||
return convert(power, float, 0.0)
|
||||
|
||||
def update(self):
|
||||
"""Called by the vera device callback to update state."""
|
||||
"""Handle state updates."""
|
||||
self._state = self.vera_device.get_hvac_mode()
|
||||
|
||||
@property
|
||||
|
||||
Reference in new issue
Block a user