diff --git a/README.md b/README.md index ef38bbac..160cf72f 100644 --- a/README.md +++ b/README.md @@ -324,7 +324,7 @@ event_gallery: | Option | Default | Overridable | Description | | - | - | - | - | -| `min_columns` | `5` | :heavy_multiplication_x: | The minimum number of columns to show in the gallery -- smaller values will render fewer but larger thumbnail columns. Thumbnails will never be stretched beyond their intrinsic size (typically `175px`). All available space (in normal mode, or fullscreen mode) will be occupied by the gallery, so more columns than `min_columns` will often be rendered if space allows for more full-sized thumbnails. For normal sized Lovelace cards (`492px` wide), this typically means there'll never be fewer than 3 columns rendered (as otherwise the thumbnails would need to stretch beyond their actual size). Value set must be >= 1. | +| `min_columns` | `5` | :heavy_multiplication_x: | The minimum number of columns to show in the gallery -- smaller values will render fewer but larger thumbnail columns. Thumbnails will never be stretched beyond their intrinsic size (typically `175px`). All available space (in normal mode, or fullscreen mode) will be occupied by the gallery, so more columns than `min_columns` will often be rendered if space allows for more full-sized thumbnails. For normal sized Lovelace cards (`492px` wide), this typically means there'll never be fewer than 3 columns rendered (as otherwise the thumbnails would need to stretch beyond their actual size). Must be `1 <= x <= 10`. | | `actions` | | :heavy_multiplication_x: | Actions to use for all views that use the `event_gallery` (e.g. `clips`, `snapshots`). See [actions](#actions) below.| ### Image Options diff --git a/src/types.ts b/src/types.ts index 56a27213..d20d42f0 100644 --- a/src/types.ts +++ b/src/types.ts @@ -617,7 +617,7 @@ const galleryConfigDefault = { const galleryConfigSchema = z .object({ - min_columns: z.number().min(1).default(galleryConfigDefault.min_columns), + min_columns: z.number().min(1).max(10).default(galleryConfigDefault.min_columns), }) .merge(actionsSchema) .default(galleryConfigDefault);