Skip to content

Commit f630852

Browse files
committed
Update FunHouse Home Assistant code with more comments
1 parent 4424bca commit f630852

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

FunHouse_HA_Companion/code.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@
2525
funhouse = FunHouse(default_bg=0x0F0F00)
2626
funhouse.peripherals.dotstars.fill(INITIAL_LIGHT_COLOR)
2727

28+
# Don't display the splash yet to avoid
29+
# redrawing labels after each one is added
2830
funhouse.display.show(None)
31+
32+
# Add the labels
2933
funhouse.add_text(
3034
text="Temperature:",
3135
text_position=(20, 30),
@@ -62,12 +66,13 @@
6266
text_color=0xFFFF00,
6367
text_font="fonts/Arial-Bold-24.pcf",
6468
)
69+
70+
# Now display the splash to draw all labels at once
6571
funhouse.display.show(funhouse.splash)
6672

6773
status = Circle(229, 10, 10, fill=0xFF0000, outline=0x880000)
6874
funhouse.splash.append(status)
6975

70-
7176
def update_enviro():
7277
global environment
7378

0 commit comments

Comments
 (0)