Fix format issues

pull/12483/head
Tom Harris 2018-02-17 17:24:02 -05:00
parent dd506602a1
commit a00c9f6205
3 changed files with 19 additions and 15 deletions

View File

@ -40,7 +40,8 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
class InsteonPLMFan(FanEntity):
"""An INSTEON fan component."""
def __init__(self, hass, device, stateKey, newnames, supported_features: int, ) -> None:
def __init__(self, hass, device, stateKey, newnames,
supported_features: int, ) -> None:
"""Initialize the entity."""
self._hass = hass
self._state = device.states[stateKey]
@ -113,7 +114,9 @@ class InsteonPLMFan(FanEntity):
@callback
def async_fan_update(self, deviceid, statename, val):
"""Receive notification from transport that new data exists."""
_LOGGER.info('Received update calback from PLM for device %s state %s', deviceid, statename)
_LOGGER.info('Received update calback from PLM for device %s state %s',
deviceid,
statename)
self.hass.async_add_job(self.async_update_ha_state())
@property
@ -128,7 +131,7 @@ class InsteonPLMFan(FanEntity):
return 0x3f
elif speed == SPEED_MEDIUM:
return 0xbe
elif SPEED == SPEED_HIGH:
elif speed == SPEED_HIGH:
return 0xff
return 0xbe

View File

@ -65,7 +65,7 @@ def async_setup(hass, config):
newnames = ''
use_newnames = False
if newnames.lower() == 'y' or newnames.lower() == 'yes':
use_newnames == True
use_newnames = True
@callback
def async_plm_new_device(device):
@ -81,6 +81,7 @@ def async_setup(hass, config):
device.address,
device.states[stateKey].name,
platform)
hass.async_add_job(
discovery.async_load_platform(
hass, platform, DOMAIN,