Update links (#3488)

This commit is contained in:
Fabian Affolter 2016-09-23 10:28:05 +02:00 committed by GitHub
parent e4c5f356e2
commit 0065dc0cd7
3 changed files with 5 additions and 15 deletions

View File

@ -2,7 +2,7 @@
Support for SleepIQ sensors. Support for SleepIQ sensors.
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/sensor.sleepiq/ https://home-assistant.io/components/binary_sensor.sleepiq/
""" """
from homeassistant.components import sleepiq from homeassistant.components import sleepiq
from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.components.binary_sensor import BinarySensorDevice
@ -21,10 +21,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
dev = list() dev = list()
for bed_id, _ in data.beds.items(): for bed_id, _ in data.beds.items():
for side in sleepiq.SIDES: for side in sleepiq.SIDES:
dev.append(IsInBedBinarySensor( dev.append(IsInBedBinarySensor(data, bed_id, side))
data,
bed_id,
side))
add_devices(dev) add_devices(dev)
@ -34,10 +31,7 @@ class IsInBedBinarySensor(sleepiq.SleepIQSensor, BinarySensorDevice):
def __init__(self, sleepiq_data, bed_id, side): def __init__(self, sleepiq_data, bed_id, side):
"""Initialize the sensor.""" """Initialize the sensor."""
sleepiq.SleepIQSensor.__init__(self, sleepiq.SleepIQSensor.__init__(self, sleepiq_data, bed_id, side)
sleepiq_data,
bed_id,
side)
self.type = sleepiq.IS_IN_BED self.type = sleepiq.IS_IN_BED
self._state = None self._state = None
self._name = sleepiq.SENSOR_TYPES[self.type] self._name = sleepiq.SENSOR_TYPES[self.type]

View File

@ -2,7 +2,7 @@
Support for SleepIQ sensors. Support for SleepIQ sensors.
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/sensor.sleepiq/ https://home-assistant.io/components/sleepiq/
""" """
from homeassistant.components import sleepiq from homeassistant.components import sleepiq
@ -31,10 +31,7 @@ class SleepNumberSensor(sleepiq.SleepIQSensor):
def __init__(self, sleepiq_data, bed_id, side): def __init__(self, sleepiq_data, bed_id, side):
"""Initialize the sensor.""" """Initialize the sensor."""
sleepiq.SleepIQSensor.__init__(self, sleepiq.SleepIQSensor.__init__(self, sleepiq_data, bed_id, side)
sleepiq_data,
bed_id,
side)
self._state = None self._state = None
self.type = sleepiq.SLEEP_NUMBER self.type = sleepiq.SLEEP_NUMBER

View File

@ -21,7 +21,6 @@ DOMAIN = 'sleepiq'
REQUIREMENTS = ['sleepyq==0.6'] REQUIREMENTS = ['sleepyq==0.6']
# Return cached results if last scan was less then this time ago.
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=30) MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=30)
IS_IN_BED = 'is_in_bed' IS_IN_BED = 'is_in_bed'