Calendar analog clock with ticks and numerals; tiles without background
Firmware 0.2.16: the analog clock uses index strokes with 12/3/6/9 numerals on large cards and shows a calendar block (weekday, big day, short month) beside the dial on single tiles; wide cards keep the digital time and date. New palette key 'none' hides only the card fill and border: geometry, padding and the pressed flash stay identical. Skeleton frames and the render self-test honour the transparency. App 0.2.15: 'Geen' in the background palette with a dashed mockup tile, min_firmware 0.2.16 for such layouts, demo layout with the bare calendar clock (--wide for the double-width clock). README and AGENTS note that every push is a release and bumps the add-on version. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,17 @@ class PaletteTests(unittest.IsolatedAsyncioTestCase):
|
||||
fresh.save('text.screen',{'title':'Nieuw','tiles':[{'entity':'light.a','options':{'background':'auto'}}]})
|
||||
self.assertEqual(fresh.layouts['text.screen']['tiles'][0]['options']['background'],'auto')
|
||||
|
||||
def test_none_hides_the_card_and_needs_firmware_0216(self):
|
||||
from core import min_firmware
|
||||
header=(Path(__file__).resolve().parents[1]/'components/smart_display/tile_palette.h').read_text()
|
||||
self.assertIn('name=="none"',header)
|
||||
self.assertIsNone(TILE_BACKGROUNDS['none']['color'])
|
||||
for entity in ('screen.clock','light.a'):
|
||||
layout=validate_layout({'title':'Thuis','tiles':[{'entity':entity,'options':{'background':'none'}}]})
|
||||
self.assertEqual(layout['tiles'][0]['options']['background'],'none')
|
||||
self.assertEqual(min_firmware(layout),(0,2,16))
|
||||
self.assertEqual(min_firmware({'tiles':[{'entity':'light.a','options':{'background':'red'}}]}),None)
|
||||
|
||||
def test_unapproved_colors_rejected(self):
|
||||
for value in ('#000000','url(test)','unknown',None,{},42):
|
||||
with self.assertRaises(ValueError):validate_layout({'title':'Thuis','tiles':[{'entity':'light.a','options':{'background':value}}]})
|
||||
|
||||
Reference in New Issue
Block a user