From 5a36f100a9e368dc3897b9affbbd931e87d8db45 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 23 May 2023 10:43:53 +0200 Subject: [PATCH] Add WS command for getting a config entry (#16600) * Add WS command for getting a config entry * Correct typing --- src/data/config_entries.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/data/config_entries.ts b/src/data/config_entries.ts index b8e17db1da..ec1cfc3def 100644 --- a/src/data/config_entries.ts +++ b/src/data/config_entries.ts @@ -89,11 +89,17 @@ export const getConfigEntries = ( } } return hass.callWS({ - type: "config_entries/get", + type: "config_entries/get_matching", ...params, }); }; +export const getConfigEntry = (hass: HomeAssistant, configEntryId: string) => + hass.callWS<{ config_entry: ConfigEntry }>({ + type: "config_entries/get", + entry_id: configEntryId, + }); + export const updateConfigEntry = ( hass: HomeAssistant, configEntryId: string,