diff --git a/haco/constants.py b/haco/constants.py index bc588f7..474625d 100644 --- a/haco/constants.py +++ b/haco/constants.py @@ -3,7 +3,7 @@ import string from pathlib import Path CHARS_ALLOWED = string.ascii_lowercase + string.digits -SEPS_ALLOWED = '_- ' +SEPS = '_- /' BRANCH = 'release' CONFIGS_PATH = Path(os.environ['HACO_CONFIGS_PATH']) diff --git a/haco/mqtt.py b/haco/mqtt.py index 8cd230c..479d067 100644 --- a/haco/mqtt.py +++ b/haco/mqtt.py @@ -36,7 +36,7 @@ async def listen(client, devices): break if not device: - msg = f'Got announce from device with no config: Hostname: {data_announce["hostname"]} MAC:{data_announce["mac"]}. Publishing config data.' + msg = f"""Found device with no configuration module assigned. Assign one in Add-On Configuration: "{data_announce["device_name"]}" Hostname: {data_announce["hostname"]} {data_announce["hostname"]} MAC:{data_announce["mac"]}.""" tools.logger.info(msg) continue diff --git a/haco/tools.py b/haco/tools.py index 6d9e9fe..48a086a 100644 --- a/haco/tools.py +++ b/haco/tools.py @@ -65,7 +65,7 @@ def sanitize_name(s, sep='-'): chars = [] for c in s.lower(): - if c in constants.SEPS_ALLOWED: + if c in constants.SEPS: chars.append(sep) elif c in constants.CHARS_ALLOWED: chars.append(c)