docs: Various small documentation improvements (#2386)
This commit is contained in:
@@ -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,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,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(),
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user