Build every screen from one shared core plus a small file per board, the same firmware as before (0.2.84)
The two board profiles (5,000 lines each, 87 % the same text) become packages/core.yaml and one file per board under packages/boards/: the hardware, a table of 84 sizes and font sizes, 18 hooks with the lines of C++ only that board adds inside a shared lambda, and the board's own sections. packages/cyd.yaml and packages/guition.yaml keep their names and places (a screen installed from ESP Screens builds as before); home-like-2432s028.yaml and guition-4848s040.yaml become the same entries for a checkout. The firmware stays 0.2.70: the C++ ESPHome generates for each board, through the checkout profile and through the GitHub package route, was compared line by line with the old profiles' (docs/TEST_RESULTS_0284.md). tools/check_packages.py replaces tools/generate_packages.py; tools/profiles.py gives the tests and tools the three files as one; docs/PROFILES.md says how the files fit together and how a board is added. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,8 @@ import unittest
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(ROOT / 'tools'))
|
||||
import profiles # noqa: E402
|
||||
sys.path.insert(0, str(ROOT / 'screen_manager/app'))
|
||||
import header_bar # noqa: E402
|
||||
import tile_icons # noqa: E402
|
||||
@@ -20,7 +22,7 @@ class OffLook(unittest.TestCase):
|
||||
def test_the_fonts_carry_the_bulb_that_is_off(self):
|
||||
self.assertEqual(tile_icons.GLYPHS['lightbulb-off'], 'F0E4F')
|
||||
for name in ('guition-4848s040.yaml', 'home-like-2432s028.yaml', 'packages/cyd.yaml', 'packages/guition.yaml'):
|
||||
self.assertIn('"\\U000F0E4F" # lightbulb-off', (ROOT / name).read_text(), name)
|
||||
self.assertIn('"\\U000F0E4F" # lightbulb-off', profiles.text(name), name)
|
||||
|
||||
def test_the_screen_crosses_out_its_own_bulb_and_greys_what_is_off(self):
|
||||
self.assertIn('if (d == "light" && tile.state == "off") return "\\U000F0E4F";', TILES)
|
||||
|
||||
Reference in New Issue
Block a user