Change delimiter back to colon.

This commit is contained in:
Dermot Duffy
2023-03-13 21:49:35 -07:00
parent b0528d94f9
commit 1e72a7fa11
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -3416,7 +3416,7 @@ The card can respond to actions in the query string (see [below](#query-string-a
This example assumes the dashboard URL is `https://ha.mydomain.org/lovelace-test/0`. This example assumes the dashboard URL is `https://ha.mydomain.org/lovelace-test/0`.
``` ```
https://ha.mydomain.org/lovelace-test/0?frigate-card-action/camera_select=kitchen&frigate-card-action/expand_toggle https://ha.mydomain.org/lovelace-test/0?frigate-card-action:camera_select=kitchen&frigate-card-action:expand_toggle
``` ```
</details> </details>
@@ -3435,7 +3435,7 @@ cameras:
``` ```
``` ```
https://ha.mydomain.org/lovelace-test/0?frigate-card-action/main/clips https://ha.mydomain.org/lovelace-test/0?frigate-card-action:main:clips
``` ```
</details> </details>
@@ -3508,13 +3508,13 @@ It is possible to pass the Frigate card one or more actions from the URL (e.g. s
To send an action to *all* Frigate cards on a dashboard: To send an action to *all* Frigate cards on a dashboard:
``` ```
[PATH_TO_YOUR_HA_DASHBOARD]?frigate-card-action/[ACTION]=[VALUE] [PATH_TO_YOUR_HA_DASHBOARD]?frigate-card-action:[ACTION]=[VALUE]
``` ```
To send an action to a named Frigate card on the dashboard: To send an action to a named Frigate card on the dashboard:
``` ```
[PATH_TO_YOUR_HA_DASHBOARD]?frigate-card-action/[CARD_ID]/[ACTION]=[VALUE] [PATH_TO_YOUR_HA_DASHBOARD]?frigate-card-action:[CARD_ID]:[ACTION]=[VALUE]
``` ```
| Parameter | Description | | Parameter | Description |
+1 -1
View File
@@ -4,7 +4,7 @@ import { createFrigateCardCustomAction } from './action.js';
export const getActionsFromQueryString = (): FrigateCardCustomAction[] => { export const getActionsFromQueryString = (): FrigateCardCustomAction[] => {
const params = new URLSearchParams(window.location.search); const params = new URLSearchParams(window.location.search);
const actions: FrigateCardCustomAction[] = []; const actions: FrigateCardCustomAction[] = [];
const actionRE = new RegExp(/^frigate-card-action(\/(?<cardID>\w+))?\/(?<action>\w+)/); const actionRE = new RegExp(/^frigate-card-action(:(?<cardID>\w+))?:(?<action>\w+)/);
for (const [key, value] of params.entries()) { for (const [key, value] of params.entries()) {
const match = key.match(actionRE); const match = key.match(actionRE);