From cc4df1c349b85826be5b94e0ea7ecb6fb2f0a574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lov=C3=A9n?= Date: Wed, 28 Aug 2019 16:02:32 +0200 Subject: [PATCH] Allow both _ and - in entity ids in configuration. Fix #13 --- custom_components/browser_mod/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/browser_mod/__init__.py b/custom_components/browser_mod/__init__.py index 5ddbac9..25e1e48 100644 --- a/custom_components/browser_mod/__init__.py +++ b/custom_components/browser_mod/__init__.py @@ -16,7 +16,7 @@ async def async_setup(hass, config): for d in config[DOMAIN].get(CONFIG_DEVICES, {}): name = config[DOMAIN][CONFIG_DEVICES][d].get("name", None) if name: - aliases[name] = d + aliases[name] = d.replace('_','-') hass.data[DOMAIN] = { DATA_DEVICES: {},