|
|
|
@ -54,6 +54,7 @@ class Hui(wx.Frame):
|
|
|
|
|
def add_bridges(self):
|
|
|
|
|
"""Add bridges to sizer, the entry point of the program
|
|
|
|
|
"""
|
|
|
|
|
self.SetTitle('Tinge - All Bridges')
|
|
|
|
|
if self.m_bridges:
|
|
|
|
|
for bridge in self.m_bridges:
|
|
|
|
|
btn: wx.Button = wx.Button(self.pnl, label=str(bridge))
|
|
|
|
@ -73,7 +74,8 @@ class Hui(wx.Frame):
|
|
|
|
|
Args:
|
|
|
|
|
groups (list[HueGroup]): The groups to display
|
|
|
|
|
"""
|
|
|
|
|
bridge_btn: wx.Button = wx.Button(self.pnl, label=str(self.cur_bridge))
|
|
|
|
|
self.SetTitle("Tinge - {}".format(self.cur_bridge.m_name))
|
|
|
|
|
bridge_btn: wx.Button = wx.Button(self.pnl, label="All Bridges")
|
|
|
|
|
self.sizer.Add(bridge_btn, 0, wx.EXPAND)
|
|
|
|
|
self.Bind(wx.EVT_BUTTON,
|
|
|
|
|
lambda event: self.add_bridges(), bridge_btn)
|
|
|
|
@ -101,7 +103,8 @@ class Hui(wx.Frame):
|
|
|
|
|
Args:
|
|
|
|
|
lights (list[HueLight]): The lights to display
|
|
|
|
|
"""
|
|
|
|
|
group_btn: wx.Button = wx.Button(self.pnl, label=str(self.cur_group))
|
|
|
|
|
self.SetTitle("Tinge - {}". format(self.cur_group))
|
|
|
|
|
group_btn: wx.Button = wx.Button(self.pnl, label=str(self.cur_bridge))
|
|
|
|
|
self.sizer.Add(group_btn, 0, wx.EXPAND)
|
|
|
|
|
self.Bind(wx.EVT_BUTTON,
|
|
|
|
|
lambda event: self.add_groups(self.cur_bridge.get_groups()), group_btn)
|
|
|
|
@ -179,6 +182,7 @@ class Hui(wx.Frame):
|
|
|
|
|
lightid (int): The light id of the light to display
|
|
|
|
|
"""
|
|
|
|
|
light: HueLight = self.cur_bridge.get_light_by_id(lightid)
|
|
|
|
|
self.SetTitle("Tinge - {}".format(light))
|
|
|
|
|
is_on: bool = light.is_on()
|
|
|
|
|
group: HueGroup = self.cur_group
|
|
|
|
|
group_btn: wx.Button = wx.Button(self.pnl, label=str(group))
|
|
|
|
|