* Add link to docs

* Update link
This commit is contained in:
Fabian Affolter 2016-05-21 16:59:52 +02:00
parent 53d51a467d
commit 7f0b8c5e70
4 changed files with 17 additions and 16 deletions

View File

@ -1,7 +1,8 @@
""" """
Support for Qwikswitch Relays and Dimmers as HA Lights. Support for Qwikswitch Relays and Dimmers.
See the main component for more info For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/light.qwikswitch/
""" """
import logging import logging
import homeassistant.components.qwikswitch as qwikswitch import homeassistant.components.qwikswitch as qwikswitch
@ -18,7 +19,7 @@ class QSLight(qwikswitch.QSToggleEntity, Light):
# pylint: disable=unused-argument # pylint: disable=unused-argument
def setup_platform(hass, config, add_devices, discovery_info=None): def setup_platform(hass, config, add_devices, discovery_info=None):
"""Store add_devices for the 'light' components.""" """Store add_devices for the light components."""
if discovery_info is None or 'qsusb_id' not in discovery_info: if discovery_info is None or 'qsusb_id' not in discovery_info:
logging.getLogger(__name__).error( logging.getLogger(__name__).error(
'Configure main Qwikswitch component') 'Configure main Qwikswitch component')

View File

@ -2,7 +2,7 @@
Support for Google Play Music Desktop Player. Support for Google Play Music Desktop Player.
For more details about this platform, please refer to the documentation at For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.gpm_dp/ https://home-assistant.io/components/media_player.gpmdp/
""" """
import logging import logging
import json import json
@ -39,7 +39,7 @@ class GPMDP(MediaPlayerDevice):
# pylint: disable=too-many-public-methods, abstract-method # pylint: disable=too-many-public-methods, abstract-method
# pylint: disable=too-many-instance-attributes # pylint: disable=too-many-instance-attributes
def __init__(self, name, address, create_connection): def __init__(self, name, address, create_connection):
"""Initialize.""" """Initialize the media player."""
self._connection = create_connection self._connection = create_connection
self._address = address self._address = address
self._name = name self._name = name

View File

@ -1,10 +1,9 @@
""" """
Support for Qwikswitch lights and switches. Support for Qwikswitch devices.
For more details about this platform, please refer to the documentation at For more details about this component, please refer to the documentation at
https://home-assistant.io/components/qwikswitch https://home-assistant.io/components/qwikswitch/
""" """
import logging import logging
from homeassistant.const import EVENT_HOMEASSISTANT_STOP from homeassistant.const import EVENT_HOMEASSISTANT_STOP
from homeassistant.components.light import ATTR_BRIGHTNESS from homeassistant.components.light import ATTR_BRIGHTNESS
@ -51,7 +50,7 @@ class QSToggleEntity(object):
# pylint: disable=no-self-use # pylint: disable=no-self-use
@property @property
def should_poll(self): def should_poll(self):
"""State Polling needed.""" """No polling needed."""
return False return False
@property @property
@ -61,11 +60,11 @@ class QSToggleEntity(object):
@property @property
def is_on(self): def is_on(self):
"""Check if On (non-zero).""" """Check if device is on (non-zero)."""
return self._value > 0 return self._value > 0
def update_value(self, value): def update_value(self, value):
"""Decode QSUSB value & update HA state.""" """Decode the QSUSB value and update the Home assistant state."""
if value != self._value: if value != self._value:
self._value = value self._value = value
# pylint: disable=no-member # pylint: disable=no-member
@ -129,7 +128,7 @@ def setup(hass, config):
{'qsusb_id': id(qsusb)}, config) {'qsusb_id': id(qsusb)}, config)
def qs_callback(item): def qs_callback(item):
"""Typically a btn press or update signal.""" """Typically a button press or update signal."""
# If button pressed, fire a hass event # If button pressed, fire a hass event
if item.get('cmd', '') in cmd_buttons: if item.get('cmd', '') in cmd_buttons:
hass.bus.fire('qwikswitch.button.' + item.get('id', '@no_id')) hass.bus.fire('qwikswitch.button.' + item.get('id', '@no_id'))

View File

@ -1,7 +1,8 @@
""" """
Support for Qwikswitch Relays as HA Switches. Support for Qwikswitch relays.
See the main component for more info For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.qwikswitch/
""" """
import logging import logging
import homeassistant.components.qwikswitch as qwikswitch import homeassistant.components.qwikswitch as qwikswitch
@ -18,7 +19,7 @@ class QSSwitch(qwikswitch.QSToggleEntity, SwitchDevice):
# pylint: disable=unused-argument # pylint: disable=unused-argument
def setup_platform(hass, config, add_devices, discovery_info=None): def setup_platform(hass, config, add_devices, discovery_info=None):
"""Store add_devices for the 'switch' components.""" """Store add_devices for the switch components."""
if discovery_info is None or 'qsusb_id' not in discovery_info: if discovery_info is None or 'qsusb_id' not in discovery_info:
logging.getLogger(__name__).error( logging.getLogger(__name__).error(
'Configure main Qwikswitch component') 'Configure main Qwikswitch component')