docs: Various small documentation improvements (#2386)

This commit is contained in:
Dermot Duffy
2026-03-01 20:23:59 -08:00
committed by GitHub
parent db0a747729
commit 526acf7688
26 changed files with 69 additions and 384 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import { z } from 'zod';
// https://www.home-assistant.io/lovelace/picture-elements/#custom-elements
// https://www.home-assistant.io/dashboards/picture-elements/#custom-elements
export const customSchema = z
.object({
// Insist that Advanced Camera Card custom elements are handled by other schemas.
+1 -1
View File
@@ -1,7 +1,7 @@
import { z } from 'zod';
import { elementsBaseSchema } from '../base';
// https://www.home-assistant.io/lovelace/picture-elements/#icon-element
// https://www.home-assistant.io/dashboards/picture-elements/#icon-element
export const iconSchema = elementsBaseSchema.extend({
type: z.literal('icon'),
icon: z.string(),
+1 -1
View File
@@ -1,7 +1,7 @@
import { z } from 'zod';
import { elementsBaseSchema } from '../base';
// https://www.home-assistant.io/lovelace/picture-elements/#image-element
// https://www.home-assistant.io/dashboards/picture-elements/#image-element
export const imageSchema = elementsBaseSchema.extend({
type: z.literal('image'),
entity: z.string().optional(),
@@ -1,7 +1,7 @@
import { z } from 'zod';
import { elementsBaseSchema } from '../base';
// https://www.home-assistant.io/lovelace/picture-elements/#service-call-button
// https://www.home-assistant.io/dashboards/picture-elements/#service-call-button
export const serviceCallButtonSchema = elementsBaseSchema.extend({
type: z.literal('service-button'),
@@ -1,7 +1,7 @@
import { z } from 'zod';
import { elementsBaseSchema } from '../base';
// https://www.home-assistant.io/lovelace/picture-elements/#state-badge
// https://www.home-assistant.io/dashboards/picture-elements/#state-badge
export const stateBadgeIconSchema = elementsBaseSchema.extend({
type: z.literal('state-badge'),
entity: z.string(),
@@ -1,7 +1,7 @@
import { z } from 'zod';
import { elementsBaseSchema } from '../base';
// https://www.home-assistant.io/lovelace/picture-elements/#state-icon
// https://www.home-assistant.io/dashboards/picture-elements/#state-icon
export const stateIconSchema = elementsBaseSchema.extend({
type: z.literal('state-icon'),
entity: z.string(),
@@ -1,7 +1,7 @@
import { z } from 'zod';
import { elementsBaseSchema } from '../base';
// https://www.home-assistant.io/lovelace/picture-elements/#state-label
// https://www.home-assistant.io/dashboards/picture-elements/#state-label
export const stateLabelSchema = elementsBaseSchema.extend({
type: z.literal('state-label'),
entity: z.string(),
+1 -1
View File
@@ -23,7 +23,7 @@ import { stateLabelSchema } from './stock/state-label';
// typescript circular dependency errors as the types need to be both included
// in the master pictureElementSchema, but also refer to it internally.
// https://www.home-assistant.io/lovelace/picture-elements/#image-element
// https://www.home-assistant.io/dashboards/picture-elements/#image-element
export const conditionalSchema = z.object({
type: z.literal('conditional'),
conditions: stockConditionSchema.array(),