mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Use entity instead of entity_id for more info action (#22603)
This commit is contained in:
parent
744cda3974
commit
5db293ce01
@ -28,7 +28,7 @@ export interface UrlActionConfig extends BaseActionConfig {
|
|||||||
|
|
||||||
export interface MoreInfoActionConfig extends BaseActionConfig {
|
export interface MoreInfoActionConfig extends BaseActionConfig {
|
||||||
action: "more-info";
|
action: "more-info";
|
||||||
entity_id?: string;
|
entity?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AssistActionConfig extends BaseActionConfig {
|
export interface AssistActionConfig extends BaseActionConfig {
|
||||||
|
@ -95,7 +95,7 @@ export const handleAction = async (
|
|||||||
switch (actionConfig.action) {
|
switch (actionConfig.action) {
|
||||||
case "more-info": {
|
case "more-info": {
|
||||||
const entityId =
|
const entityId =
|
||||||
actionConfig.entity_id ||
|
actionConfig.entity ||
|
||||||
config.entity ||
|
config.entity ||
|
||||||
config.camera_image ||
|
config.camera_image ||
|
||||||
config.image_entity;
|
config.image_entity;
|
||||||
|
@ -63,7 +63,7 @@ const actionConfigStructAssist = type({
|
|||||||
|
|
||||||
const actionConfigStructMoreInfo = type({
|
const actionConfigStructMoreInfo = type({
|
||||||
action: literal("more-info"),
|
action: literal("more-info"),
|
||||||
entity_id: optional(string()),
|
entity: optional(string()),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const actionConfigStructType = object({
|
export const actionConfigStructType = object({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user