Second hand on the analog clock, sliders like Home Assistant's, one top bar on every card (0.2.43)
Firmware 0.2.37 for both boards: - The analog clock card gets a thin red second hand that moves every second while the screen is awake (runtime_tiles::screen_awake, set by the profiles from display_dimmed); in standby it hides and the clock keeps its once-a-minute redraw. - Card sliders follow HA's control slider: 12/42 and 8/42 corners, a 4 px handle an eighth of the height from the fill end, a stub of a third of the height at 0 or 1 %, the track in the fill colour at 20 %. An off light or fan shows only the empty grey track, also in the colour card's brightness row. A light's slider floors at 1 %. - Every overlay card shares one top bar: a round back arrow at the left (60/40 px), the name centred, and only the climate power as a right-hand action. The "done"/"ok" buttons of the colour and vacuum cards are gone; the brightness card gets its arrow. - The top bar reads "Connecting to Home Assistant..." / "Waiting for ESP Screens..." until the first layout, instead of "Choose tiles in HA". Checked with the host renderer for both boards and on the Guition over USB. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -222,6 +222,19 @@ class ParityTests(unittest.TestCase):
|
||||
self.assertIn('render_header();', TILES.split('inline void render(lv_obj_t *room) {', 1)[1].split('\n', 5)[4])
|
||||
self.assertLessEqual(HEADER_MIN_FIRMWARE, tuple(int(p) for p in FIRMWARE_VERSION.split('.')))
|
||||
|
||||
def test_second_hand_runs_only_while_the_screen_is_awake(self):
|
||||
for name in PROFILES:
|
||||
text = (ROOT / name).read_text()
|
||||
self.assertIn('runtime_tiles::screen_awake = []() { return !id(display_dimmed); };', text, name)
|
||||
for name in ('packages/cyd.yaml', 'packages/guition.yaml'):
|
||||
self.assertIn('runtime_tiles::screen_awake', (ROOT / name).read_text(), name)
|
||||
self.assertIn('inline bool awake() { return !screen_awake || screen_awake(); }', TILES)
|
||||
second_hand = TILES.split('inline void second_hand(', 1)[1].split('\n}', 1)[0]
|
||||
self.assertIn('set_hidden(p,!(awake() && now.is_valid()));', second_hand)
|
||||
self.assertIn('part_line(w,18,w.points+28,2,w.hand_width)', second_hand)
|
||||
tick = TILES.split('inline void tick() {', 1)[1]
|
||||
self.assertIn('t.builtin() && t.display=="analog")second_hand(w,now);', tick)
|
||||
|
||||
HAS_AIOHTTP = importlib.util.find_spec('aiohttp') is not None
|
||||
if HAS_AIOHTTP:
|
||||
from aiohttp.test_utils import TestClient, TestServer
|
||||
|
||||
Reference in New Issue
Block a user