Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
jziolkowski committed Sep 15, 2024
1 parent d98dd6d commit 4761399
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions tdmgr/GUI/delegates/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ class RectSpacing:


RECT_ADJUSTMENT = (2, 2, -1, -1)
SHUTTER_RECT_SIZE = QSize(
RECT_SIZE.width() * 2 + RectSpacing.h * 2, RECT_SIZE.height()
)
SHUTTER_RECT_SIZE = QSize(RECT_SIZE.width() * 2 + RectSpacing.h * 2, RECT_SIZE.height())


def get_pixmap_for_rssi(rssi: int) -> QPixmap:
Expand Down
4 changes: 3 additions & 1 deletion tdmgr/GUI/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,9 @@ def move_shutter(self, action):
idx = 1 + self.agShutters.actions().index(action)
shutter = (idx + 1) // 2
direction = self.device.p[f"Shutter{shutter}"]["Direction"]
action = "ShutterStop" if direction != 0 else "ShutterClose" if idx % 2 == 0 else "ShutterOpen"
action = (
"ShutterStop" if direction != 0 else "ShutterClose" if idx % 2 == 0 else "ShutterOpen"
)
self.mqtt.publish(self.device.cmnd_topic(f"{action}{shutter}"))

def set_color(self):
Expand Down

0 comments on commit 4761399

Please sign in to comment.