Update links (#3488)
This commit is contained in:
parent
e4c5f356e2
commit
0065dc0cd7
3 changed files with 5 additions and 15 deletions
|
@ -2,7 +2,7 @@
|
|||
Support for SleepIQ sensors.
|
||||
|
||||
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.binary_sensor import BinarySensorDevice
|
||||
|
@ -21,10 +21,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||
dev = list()
|
||||
for bed_id, _ in data.beds.items():
|
||||
for side in sleepiq.SIDES:
|
||||
dev.append(IsInBedBinarySensor(
|
||||
data,
|
||||
bed_id,
|
||||
side))
|
||||
dev.append(IsInBedBinarySensor(data, bed_id, side))
|
||||
add_devices(dev)
|
||||
|
||||
|
||||
|
@ -34,10 +31,7 @@ class IsInBedBinarySensor(sleepiq.SleepIQSensor, BinarySensorDevice):
|
|||
|
||||
def __init__(self, sleepiq_data, bed_id, side):
|
||||
"""Initialize the sensor."""
|
||||
sleepiq.SleepIQSensor.__init__(self,
|
||||
sleepiq_data,
|
||||
bed_id,
|
||||
side)
|
||||
sleepiq.SleepIQSensor.__init__(self, sleepiq_data, bed_id, side)
|
||||
self.type = sleepiq.IS_IN_BED
|
||||
self._state = None
|
||||
self._name = sleepiq.SENSOR_TYPES[self.type]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue