Update FunHouse Home Assistant code with more comments

This commit is contained in:
Melissa LeBlanc-Williams 2021-06-25 09:43:18 -07:00
parent 4424bcae2b
commit f630852493

View file

@ -25,7 +25,11 @@ except ImportError:
funhouse = FunHouse(default_bg=0x0F0F00)
funhouse.peripherals.dotstars.fill(INITIAL_LIGHT_COLOR)
# Don't display the splash yet to avoid
# redrawing labels after each one is added
funhouse.display.show(None)
# Add the labels
funhouse.add_text(
text="Temperature:",
text_position=(20, 30),
@ -62,12 +66,13 @@ pres_label = funhouse.add_text(
text_color=0xFFFF00,
text_font="fonts/Arial-Bold-24.pcf",
)
# Now display the splash to draw all labels at once
funhouse.display.show(funhouse.splash)
status = Circle(229, 10, 10, fill=0xFF0000, outline=0x880000)
funhouse.splash.append(status)
def update_enviro():
global environment