Clean up after global variable deletion (#33743)
* Clean up after global variable deletion * Remove self from method calls
This commit is contained in:
parent
f3b6575272
commit
0d2de919a6
6 changed files with 3 additions and 17 deletions
|
@ -26,10 +26,9 @@ class IsInBedBinarySensor(SleepIQSensor, BinarySensorDevice):
|
|||
|
||||
def __init__(self, sleepiq_data, bed_id, side):
|
||||
"""Initialize the sensor."""
|
||||
SleepIQSensor.__init__(self, sleepiq_data, bed_id, side)
|
||||
self.type = IS_IN_BED
|
||||
super().__init__(sleepiq_data, bed_id, side)
|
||||
self._state = None
|
||||
self._name = SENSOR_TYPES[self.type]
|
||||
self._name = SENSOR_TYPES[IS_IN_BED]
|
||||
self.update()
|
||||
|
||||
@property
|
||||
|
@ -44,5 +43,5 @@ class IsInBedBinarySensor(SleepIQSensor, BinarySensorDevice):
|
|||
|
||||
def update(self):
|
||||
"""Get the latest data from SleepIQ and updates the states."""
|
||||
SleepIQSensor.update(self)
|
||||
super().update()
|
||||
self._state = self.side.is_in_bed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue