mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +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 {
|
||||
action: "more-info";
|
||||
entity_id?: string;
|
||||
entity?: string;
|
||||
}
|
||||
|
||||
export interface AssistActionConfig extends BaseActionConfig {
|
||||
|
@ -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;
|
||||
|
@ -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({
|
||||
|
Loading…
x
Reference in New Issue
Block a user