Use entity instead of entity_id for more info action (#22603)

This commit is contained in:
Paul Bottein 2024-10-31 12:59:23 +01:00 committed by GitHub
parent 744cda3974
commit 5db293ce01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ export interface UrlActionConfig extends BaseActionConfig {
export interface MoreInfoActionConfig extends BaseActionConfig {
action: "more-info";
entity_id?: string;
entity?: string;
}
export interface AssistActionConfig extends BaseActionConfig {

View File

@ -95,7 +95,7 @@ export const handleAction = async (
switch (actionConfig.action) {
case "more-info": {
const entityId =
actionConfig.entity_id ||
actionConfig.entity ||
config.entity ||
config.camera_image ||
config.image_entity;

View File

@ -63,7 +63,7 @@ const actionConfigStructAssist = type({
const actionConfigStructMoreInfo = type({
action: literal("more-info"),
entity_id: optional(string()),
entity: optional(string()),
});
export const actionConfigStructType = object({