发布

  • v1403 0979faccd4

    feat(homecore-server): seed 10 default entities on boot (--no-seed-entities to opt out)

    frostbyte_neo 发布于 2026-05-26 18:18:28 +00:00

    Companion to the seed_default_services() commit. Dashboard + States
    pages now have content on every fresh --db :memory: boot, not just
    after bash scripts/homecore-seed.sh.

    Adds:

    • new CLI flag --no-seed-entities (default: enabled)
    • seed_default_entities(hc) mirroring the bash script's 10-entity
      set (4 RuView sensing-derived + 6 conventional HA fixtures)
    • Boot log:
      Service registry seeded with 13 default service(s)
      State machine seeded with 10 default entities

    Two seeds stay in sync — integrations overwrite the same entity_ids
    via /api/states/ POST. Run with --no-seed-entities when wiring
    real plugins that populate the state machine themselves.

    Empirical (after rebuild + fresh restart):
    GET /api/states → 10 entities
    GET /api/services → 6 domains, 13 services

    homecore-server --db :memory: is now enough for the web UI to be
    fully populated on first paint.

    Co-Authored-By: claude-flow ruv@ruv.net

    下载附件