mirror of
https://github.com/home-assistant/core.git
synced 2025-08-06 14:15:12 +02:00
3.4 lint clean up
This commit is contained in:
@@ -121,6 +121,7 @@ State = collections.namedtuple('Product', 'stateType platform')
|
|||||||
|
|
||||||
class IPDB(object):
|
class IPDB(object):
|
||||||
"""Embodies the INSTEON Product Database static data and access methods."""
|
"""Embodies the INSTEON Product Database static data and access methods."""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""Create the INSTEON Product Database (IPDB)."""
|
"""Create the INSTEON Product Database (IPDB)."""
|
||||||
from insteonplm.states.onOff import (OnOffSwitch,
|
from insteonplm.states.onOff import (OnOffSwitch,
|
||||||
@@ -159,8 +160,7 @@ class IPDB(object):
|
|||||||
yield product
|
yield product
|
||||||
|
|
||||||
def __getitem__(self, key):
|
def __getitem__(self, key):
|
||||||
"""Return a Home Assistant platform from an INSTEON state type.
|
"""Return a Home Assistant platform from an INSTEON state type."""
|
||||||
"""
|
|
||||||
for state in self.states:
|
for state in self.states:
|
||||||
if isinstance(key, state.stateType):
|
if isinstance(key, state.stateType):
|
||||||
return state
|
return state
|
||||||
|
@@ -125,7 +125,7 @@ class InsteonPLMOpenClosedDevice(SwitchDevice):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
"""Return the name of the node. (used for Entity_ID)"""
|
"""Return the name of the node (used for Entity_ID)."""
|
||||||
name = ''
|
name = ''
|
||||||
if self._insteon_device_state.group == 0x01:
|
if self._insteon_device_state.group == 0x01:
|
||||||
name = self._insteon_device.id
|
name = self._insteon_device.id
|
||||||
|
Reference in New Issue
Block a user