fix: Reolink PTZ support should detect presets (#1997)

- Related: #1964
This commit is contained in:
Dermot Duffy
2025-04-06 17:47:43 +01:00
committed by GitHub
parent e7a9e20c9e
commit a24c9628c5
6 changed files with 253 additions and 63 deletions
+19
View File
@@ -218,6 +218,25 @@ export function createPerformAction(
};
}
export function createSelectOptionAction(
domain: 'select' | 'input_select',
entityID: string,
option: string,
options?: {
cardID?: string;
},
): PerformActionActionConfig {
return createPerformAction(`${domain}.select_option`, {
...options,
target: {
entity_id: entityID,
},
data: {
option: option,
},
});
}
/**
* Get an action configuration given a config and an interaction (e.g. 'tap').
* @param interaction The interaction: `tap`, `hold` or `double_tap`