Opening hours card

Show open or closed at a glance, when that changes, and the week's hours with today marked and holiday exceptions.

State whether the venue is open or closed and when that changes. Show the week's hours with today marked, and list holiday exceptions in place of the regular hours.

Live card

This card is drawn in your browser by the same code the Players run, with sample data.

Category: Retail. Tags: Schedules, Stores, Restaurants and cafes, Healthcare.

Data and privacy

This card uses its configured properties and live card data.

Properties

For theme, background, accent, colour overrides and position, see Common properties.

Static properties

NameTypeDefaultValues and limitsDescription
titlestring""maxLength: 40
hour12booleanfalse
closingSoonMinutesinteger30minimum: 0; maximum: 180Minutes before closing (or opening) that the status turns to closing soon (opening soon).
timeZonestring, nullnull

Dynamic properties

NameTypeDefaultValues and limitsDescription
hoursobjectadditionalProperties: false; RequiredEach weekday's open ranges; a missing or empty day is closed.
hours.monarray[]maxItems: 4
hours.mon[].openstringpattern: "^([01]\\d|2[0-3]):[0-5]\\d$"; Required
hours.mon[].closestringpattern: "^(([01]\\d|2[0-3]):[0-5]\\d|24:00)$"; RequiredAt or before open runs past midnight; 24:00 is the end of the day.
hours.tuearray[]maxItems: 4
hours.tue[].openstringpattern: "^([01]\\d|2[0-3]):[0-5]\\d$"; Required
hours.tue[].closestringpattern: "^(([01]\\d|2[0-3]):[0-5]\\d|24:00)$"; RequiredAt or before open runs past midnight; 24:00 is the end of the day.
hours.wedarray[]maxItems: 4
hours.wed[].openstringpattern: "^([01]\\d|2[0-3]):[0-5]\\d$"; Required
hours.wed[].closestringpattern: "^(([01]\\d|2[0-3]):[0-5]\\d|24:00)$"; RequiredAt or before open runs past midnight; 24:00 is the end of the day.
hours.thuarray[]maxItems: 4
hours.thu[].openstringpattern: "^([01]\\d|2[0-3]):[0-5]\\d$"; Required
hours.thu[].closestringpattern: "^(([01]\\d|2[0-3]):[0-5]\\d|24:00)$"; RequiredAt or before open runs past midnight; 24:00 is the end of the day.
hours.friarray[]maxItems: 4
hours.fri[].openstringpattern: "^([01]\\d|2[0-3]):[0-5]\\d$"; Required
hours.fri[].closestringpattern: "^(([01]\\d|2[0-3]):[0-5]\\d|24:00)$"; RequiredAt or before open runs past midnight; 24:00 is the end of the day.
hours.satarray[]maxItems: 4
hours.sat[].openstringpattern: "^([01]\\d|2[0-3]):[0-5]\\d$"; Required
hours.sat[].closestringpattern: "^(([01]\\d|2[0-3]):[0-5]\\d|24:00)$"; RequiredAt or before open runs past midnight; 24:00 is the end of the day.
hours.sunarray[]maxItems: 4
hours.sun[].openstringpattern: "^([01]\\d|2[0-3]):[0-5]\\d$"; Required
hours.sun[].closestringpattern: "^(([01]\\d|2[0-3]):[0-5]\\d|24:00)$"; RequiredAt or before open runs past midnight; 24:00 is the end of the day.
exceptionsarray[]maxItems: 40
exceptions[].datestringpattern: "^\\d{4}-\\d{2}-\\d{2}$"; Required
exceptions[].closedbooleanfalse
exceptions[].rangesarray[]maxItems: 4
exceptions[].ranges[].openstringpattern: "^([01]\\d|2[0-3]):[0-5]\\d$"; Required
exceptions[].ranges[].closestringpattern: "^(([01]\\d|2[0-3]):[0-5]\\d|24:00)$"; RequiredAt or before open runs past midnight; 24:00 is the end of the day.
exceptions[].notestring""maxLength: 40

Example params

{
  "theme": "neomustard"
}
screenrig card create --type opening-hours --major 1 --file params.json --context-file context.md

Example data

{
  "hours": {},
  "exceptions": []
}

Layouts

This fullscreen card fills the whole screen in landscape or portrait and is not placed as a corner, chip, or strip.

Layouts: full. Forms: landscape, portrait.

Use this card

Add this card to a playlist as in Publish a card canvas, place it with the layouts and anchors and update its data as in Write live values.