3e959b3df9
Everything a user sees or reads is now English: both boards' labels, status replies and logs, the ESP Screens editor and Alerts cheatsheet, and the README and guides (docs/TILES.md, CALIBRATING.md, ACCEPTANCE.md and TROUBLESHOOTING.md replace the Dutch file names). Labels follow Home Assistant's own English names (Heat/Cool modes, Heating/Cooling actions, Away, Returning to dock, weather conditions), dates use English abbreviations and the top bar writes numbers the English way. Docs use HA 2026.9's menu names (Settings -> Apps, App store, Settings -> Tools). Unused legacy files (home-like.yaml, buttons.yaml, a.out) are removed. Firmware 0.2.34 names its entities in English. Home Assistant registers a renamed ESPHome entity under a new entity ID, so the inbox text.<screen>_tegelinstellingen becomes text.<screen>_tile_settings and the layout stored under the old ID would be lost. The manager now recognises the screen by its device, during a run or after a restart, and moves its layout and update history along; the Update button and the nightly round follow the screen through the rename. Screens that still run 0.2.33 or older keep working: both languages are matched. Main is the only release branch from now on. Tested on a Home Assistant Yellow (HA 2026.9.1) with both bench boards: see docs/TEST_RESULTS_0240.md. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
52 lines
2.5 KiB
Python
52 lines
2.5 KiB
Python
"""Run the firmware's render test through its encrypted API; no HA actions."""
|
|
import argparse
|
|
import asyncio
|
|
import re
|
|
from pathlib import Path
|
|
import yaml
|
|
from aioesphomeapi import APIClient, LogLevel
|
|
|
|
async def main():
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument('--host', default='cyd-2432s028.local')
|
|
parser.add_argument('--name', default='cyd-2432s028', help='Expected DEVICE_NAME')
|
|
parser.add_argument('--secrets', type=Path, default=Path(__file__).resolve().parents[1] / 'secrets.yaml')
|
|
args = parser.parse_args()
|
|
secrets = yaml.safe_load(args.secrets.read_text())
|
|
client = APIClient(args.host, 6053, noise_psk=secrets['api_encryption_key'], client_info='CYD UI diagnostics', expected_name=args.name)
|
|
await client.connect(login=True)
|
|
try:
|
|
info = await client.device_info()
|
|
print(f'Connected: {info.name}, ESPHome {info.esphome_version}, compiled {info.compilation_time}', flush=True)
|
|
_, services = await client.list_entities_services()
|
|
test = next(s for s in services if s.name == 'ui_self_test')
|
|
done = asyncio.Event()
|
|
failures = []
|
|
passes = []
|
|
frames = []
|
|
slider_pass = []
|
|
def log(msg):
|
|
text = msg.message.decode(errors='replace') if isinstance(msg.message, bytes) else msg.message
|
|
if any(tag in text for tag in ('ui_test', 'UI_TEST', '[health', 'took a long')):
|
|
print(text, flush=True)
|
|
if 'page2=PASS' in text or 'page_check=PASS' in text:
|
|
passes.append(text)
|
|
match = re.search(r'frames=(\d+)', text)
|
|
if match: frames.append(int(match[1]))
|
|
if 'Light sliders: PASS' in text: slider_pass.append(text)
|
|
if 'FAIL' in text: failures.append(text)
|
|
if 'UI_TEST COMPLETE' in text: done.set()
|
|
client.subscribe_logs(log, log_level=LogLevel.LOG_LEVEL_DEBUG, dump_config=False)
|
|
await client.execute_service(test, {})
|
|
await asyncio.wait_for(done.wait(), timeout=45)
|
|
assert len(passes) == 10, f'Expected 10 page checks, got {len(passes)}'
|
|
assert not failures, failures
|
|
assert slider_pass, "Missing light slider event/capability check"
|
|
assert len(frames) == 10 and frames[-1] - frames[0] >= 40, f'Render callbacks stalled: {frames}'
|
|
print('PASS: 10 page checks and 50 overlay render cycles completed', flush=True)
|
|
finally:
|
|
await client.disconnect()
|
|
|
|
if __name__ == '__main__':
|
|
asyncio.run(main())
|