Update docstrings
This commit is contained in:
parent
70ce179224
commit
9157bd38e8
1 changed files with 7 additions and 7 deletions
|
@ -18,7 +18,7 @@ ENTITY_ID_PATTERN = re.compile(r"^(\w+)\.(\w+)$")
|
|||
|
||||
|
||||
def generate_entity_id(entity_id_format, name, current_ids=None, hass=None):
|
||||
"""Generate a unique entity ID based on given entity IDs or used ids."""
|
||||
"""Generate a unique entity ID based on given entity IDs or used IDs."""
|
||||
name = (name or DEVICE_DEFAULT_NAME).lower()
|
||||
if current_ids is None:
|
||||
if hass is None:
|
||||
|
@ -41,12 +41,12 @@ def valid_entity_id(entity_id):
|
|||
|
||||
|
||||
class Entity(object):
|
||||
"""ABC for Home Assistant entities."""
|
||||
"""An abstract class for Home Assistant entities."""
|
||||
|
||||
# pylint: disable=no-self-use
|
||||
# SAFE TO OVERWRITE
|
||||
# The properties and methods here are safe to overwrite when inherting this
|
||||
# class. These may be used to customize the behavior of the entity.
|
||||
# The properties and methods here are safe to overwrite when inheriting
|
||||
# this class. These may be used to customize the behavior of the entity.
|
||||
@property
|
||||
def should_poll(self):
|
||||
"""Return True if entity has to be polled for state.
|
||||
|
@ -57,7 +57,7 @@ class Entity(object):
|
|||
|
||||
@property
|
||||
def unique_id(self):
|
||||
"""Return a unique id."""
|
||||
"""Return an unique ID."""
|
||||
return "{}.{}".format(self.__class__, id(self))
|
||||
|
||||
@property
|
||||
|
@ -113,7 +113,7 @@ class Entity(object):
|
|||
|
||||
@property
|
||||
def assumed_state(self):
|
||||
"""Return True if unable to access real state of entity."""
|
||||
"""Return True if unable to access real state of the entity."""
|
||||
return False
|
||||
|
||||
def update(self):
|
||||
|
@ -223,7 +223,7 @@ class Entity(object):
|
|||
|
||||
|
||||
class ToggleEntity(Entity):
|
||||
"""ABC for entities that can be turned on and off."""
|
||||
"""An abstract class for entities that can be turned on and off."""
|
||||
|
||||
# pylint: disable=no-self-use
|
||||
@property
|
||||
|
|
Loading…
Add table
Reference in a new issue