mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 13:56:53 +00:00
Fix docstrings and typos
This commit is contained in:
parent
102df3b546
commit
d740b90d69
@ -64,7 +64,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
add_devices(AwesomeLight(light) for light in hub.lights())
|
add_devices(AwesomeLight(light) for light in hub.lights())
|
||||||
|
|
||||||
class AwesomeLight(Light):
|
class AwesomeLight(Light):
|
||||||
"""Represents an AwesomeLight in Home Assistant."""
|
"""Representation an AwesomeLight in Home Assistant."""
|
||||||
|
|
||||||
def __init__(self, light):
|
def __init__(self, light):
|
||||||
"""Initialize an AwesomeLight."""
|
"""Initialize an AwesomeLight."""
|
||||||
@ -72,7 +72,7 @@ class AwesomeLight(Light):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
"""Return the display name of this light"""
|
"""Return the display name of this light."""
|
||||||
return self._light.name
|
return self._light.name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -86,7 +86,7 @@ class AwesomeLight(Light):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def is_on(self):
|
def is_on(self):
|
||||||
"""If light is on."""
|
"""Return true if light is on."""
|
||||||
return self._light.is_on()
|
return self._light.is_on()
|
||||||
|
|
||||||
def turn_on(self, **kwargs):
|
def turn_on(self, **kwargs):
|
||||||
@ -105,7 +105,7 @@ class AwesomeLight(Light):
|
|||||||
def update(self):
|
def update(self):
|
||||||
"""Fetch new state data for this light.
|
"""Fetch new state data for this light.
|
||||||
|
|
||||||
This is the only method that should fetch new data for Home Assitant.
|
This is the only method that should fetch new data for Home Assistant.
|
||||||
"""
|
"""
|
||||||
self._light.update()
|
self._light.update()
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user