Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Nutrislice School Menu

HACS Badge GitHub Release License

A Home Assistant custom integration that pulls breakfast and lunch menus from any school using Nutrislice and:

  • Creates two sensor entities with today's menu items and food images
  • Registers a nutrislice_menu.sync_menu service that fetches the upcoming week's menus and writes them as events to any HA calendar
  • Supports multiple schools — add one config entry per school

Scheduling is up to you. Call nutrislice_menu.sync_menu from a HA automation whenever you want a refresh. No background polling.


Installation

Via HACS (recommended)

  1. In HACS, click + Explore & Download Repositories
  2. Search for Nutrislice School Menu — or add this repo as a custom repository:
    • HACS → ⋮ → Custom Repositories → paste your repo URL → Category: Integration
  3. Click Download
  4. Restart Home Assistant

Manual

Copy the custom_components/nutrislice_menu/ folder into your HA config at:

/config/custom_components/nutrislice_menu/

Then restart Home Assistant.


Setup

1. Create a Local Calendar

Go to Settings → Integrations → + Add Integration → Local Calendar.
Name it School Menu → entity becomes calendar.school_menu.

2. Add the integration

Add Integration

Or go to Settings → Integrations → + Add Integration → Nutrislice School Menu.

Step 1 – District slug

Enter your district's Nutrislice subdomain. If your school's menu URL is https://jcps.nutrislice.com/menu/..., the slug is jcps.

The integration validates this live and fetches your district's school list.

Step 2 – School & Calendar

Pick your school from the dropdown (populated from Nutrislice) and choose the calendar entity to write events into.

Repeat these steps to add additional schools.

3. Create an automation to sync menus

The integration never syncs automatically. Create an automation that calls nutrislice_menu.sync_menu:

- alias: "School menu – sync Sunday evening"
  trigger:
    - platform: time
      at: "20:00:00"
  condition:
    - condition: time
      weekday: [sun]
  action:
    - service: nutrislice_menu.sync_menu

You can also trigger it manually at any time from
Developer Tools → Services → nutrislice_menu.sync_menu → Call Service.


Entities

Two sensors are created per configured school:

Entity Description
sensor.<school>_breakfast_today Today's breakfast items (comma-separated)
sensor.<school>_lunch_today Today's lunch items (comma-separated)

Sensor attributes

Attribute Description
items Full list of {name, category, image} dicts
hero_image URL of the first food image (useful for notifications)
meal_type breakfast or lunch
date ISO date string for today
school School slug
district District slug

Service: nutrislice_menu.sync_menu

Fetches this week's and next week's menus from Nutrislice, updates the sensor entities, and creates/replaces calendar events.

Optional field:

Field Description
entry_id Limit sync to one school. If omitted, all configured schools sync.

Dashboard card

The integration ships its own Lovelace card and loads it on every dashboard automatically — no HACS frontend plugin or dashboard resource needed. Add it from the card picker ("Nutrislice Menu") or in YAML:

type: custom:nutrislice-menu-card
breakfast_entity: sensor.chenoweth_menu_breakfast_today
lunch_entity: sensor.chenoweth_menu_lunch_today
title: School Menu   # optional
Option Description
breakfast_entity Breakfast sensor (optional if lunch_entity is set)
lunch_entity Lunch sensor (optional if breakfast_entity is set)
title Optional card heading

The card opens on the sensors' current day (today before 9:30 AM, the next school day after) and the ‹ › buttons step through every day loaded by the last sync. Tap a food photo to enlarge it.

Upgrading from the old html-template-card YAML? Replace the whole vertical-stack with the card above.


Finding your district slug

  1. Go to nutrislice.com and find your school
  2. The URL will look like https://<district>.nutrislice.com/menu/<school>/...
  3. The <district> part is what you enter in the config flow

Common examples:

District Slug
Jefferson County Public Schools (KY) jcps
Pleasant Valley USD (CA) pleasantvalley
Souderton Area SD (PA) soudertonsd

Troubleshooting

Symptom Fix
"Could not connect" in setup Check the district slug against your Nutrislice URL
No events in calendar Run sync_menu from Developer Tools; check HA logs for errors
Duplicate events Shouldn't happen – each sync deletes old events first. If it does, delete all 🏫 events manually and re-sync
Sensors show None Today might be a weekend or holiday; check the coordinator data in Dev Tools → States

Contributing

Issues and PRs welcome at github.com/penguincrest/nutrislice_menu.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages