Add link to docs
This commit is contained in:
1 parent
7ebda9c3c6
commit
d993f4014e
2 files changed
+16
-35
No files matched your search
@@ -1,7 +1,10 @@
|
||||
"""
|
||||
homeassistant.components.light.zwave
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Support for Z-Wave lights.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/light.zwave/
|
||||
"""
|
||||
# pylint: disable=import-error
|
||||
from openzwave.network import ZWaveNetwork
|
||||
@@ -15,7 +18,7 @@ from threading import Timer
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
""" Find and add zwave lights. """
|
||||
""" Find and add Z-Wave lights. """
|
||||
if discovery_info is None:
|
||||
return
|
||||
|
||||
@@ -34,8 +37,10 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
|
||||
|
||||
def brightness_state(value):
|
||||
""" Returns the brightness and state according to the current
|
||||
data of given value. """
|
||||
"""
|
||||
Returns the brightness and state according to the current data of given
|
||||
value.
|
||||
"""
|
||||
if value.data > 0:
|
||||
return (value.data / 99) * 255, STATE_ON
|
||||
else:
|
||||
@@ -43,7 +48,7 @@ def brightness_state(value):
|
||||
|
||||
|
||||
class ZwaveDimmer(Light):
|
||||
""" Provides a zwave dimmer. """
|
||||
""" Provides a Z-Wave dimmer. """
|
||||
# pylint: disable=too-many-arguments
|
||||
def __init__(self, value):
|
||||
self._value = value
|
||||
|
||||
Reference in new issue
Block a user