diff --git a/README.md b/README.md index 3729236b..6682085c 100644 --- a/README.md +++ b/README.md @@ -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`. ``` -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 ``` @@ -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 ``` @@ -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: ``` -[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: ``` -[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 | diff --git a/src/utils/querystring.ts b/src/utils/querystring.ts index ccf916e3..133d9ca0 100644 --- a/src/utils/querystring.ts +++ b/src/utils/querystring.ts @@ -4,7 +4,7 @@ import { createFrigateCardCustomAction } from './action.js'; export const getActionsFromQueryString = (): FrigateCardCustomAction[] => { const params = new URLSearchParams(window.location.search); const actions: FrigateCardCustomAction[] = []; - const actionRE = new RegExp(/^frigate-card-action(\/(?\w+))?\/(?\w+)/); + const actionRE = new RegExp(/^frigate-card-action(:(?\w+))?:(?\w+)/); for (const [key, value] of params.entries()) { const match = key.match(actionRE);