feat(backend): signage widgets, the message of the day, the weather (platform-v2 step 5.4c)

- Widget on text and menu slides: logo (a picture), name, date (short/long),
  clock (seconds), message (the venue's or its own text), QR code (ordering /
  QR menu / a link; the screen gets the link), weather (1-3 days); position
  (corners, top / bottom bar) and size. Logos count as media usage.
- The screen gets `venue`: name, message of the day, weather.
- PUT /api/signage/message (one place, every screen told at once).
- services/weather.py: the venue's place (town search through
  /api/signage/weather/places, PUT/DELETE /weather/place, °C/°F), Open-Meteo
  every 30 min (signage worker), kept in memory; no place, no internet or older
  than 3 h → weather null and the widget hides. signage.weather_offline when
  the town search can't reach the service. Checked against the real service.
- tests: test_signage_widgets.py (5, a fake Open-Meteo); 520 passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 18:42:52 +02:00
co-authored by Claude Opus 5.5
parent 97140b13f9
commit b5951ba373
8 changed files with 437 additions and 7 deletions
+2 -1
View File
@@ -146,6 +146,7 @@
"not_a_screen": "Device {{device_id}} isn't a signage screen.",
"not_a_video": "Pick a video for this slide.",
"content_invalid": "This slide's setting isn't valid ({{field}}: {{reason}}).",
"order_mismatch": "The playlist changed in the meantime. Reload it and try again."
"order_mismatch": "The playlist changed in the meantime. Reload it and try again.",
"weather_offline": "The weather service can't be reached: the venue's server needs internet for it."
}
}