Black
This commit is contained in:
parent
da05dfe708
commit
4de97abc3a
2676 changed files with 163166 additions and 140084 deletions
|
@ -14,13 +14,11 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
for handler in hass.data[DATA_KEY].values():
|
||||
cube = handler.cube
|
||||
for device in cube.devices:
|
||||
name = "{} {}".format(
|
||||
cube.room_by_id(device.room_id).name, device.name)
|
||||
name = "{} {}".format(cube.room_by_id(device.room_id).name, device.name)
|
||||
|
||||
# Only add Window Shutters
|
||||
if cube.is_windowshutter(device):
|
||||
devices.append(
|
||||
MaxCubeShutter(handler, name, device.rf_address))
|
||||
devices.append(MaxCubeShutter(handler, name, device.rf_address))
|
||||
|
||||
if devices:
|
||||
add_entities(devices)
|
||||
|
@ -32,7 +30,7 @@ class MaxCubeShutter(BinarySensorDevice):
|
|||
def __init__(self, handler, name, rf_address):
|
||||
"""Initialize MAX! Cube BinarySensorDevice."""
|
||||
self._name = name
|
||||
self._sensor_type = 'window'
|
||||
self._sensor_type = "window"
|
||||
self._rf_address = rf_address
|
||||
self._cubehandle = handler
|
||||
self._state = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue