MycroftAI / skill-homeassistant

Mycroft Skill/Integration for Homeassistant
GNU Lesser General Public License v3.0
115 stars 62 forks source link

Fix uncompleted dialogs when `|` is present in text. #123

Closed Tony763 closed 1 year ago

Tony763 commented 1 year ago

Description

Hi, this PR is successor of PR #107 made by PocketMiner82 (With his approve)

Main goal of PR is to change entitiy name if it contain symbol | as it cause problems when speaking dialogs. Text after | is not read.

To preserve enitity name in original, text normalization is done only to dialogs.

New internal function _speak_dialog is presented and used with a new decorator function normalize_dialog to handle text normalization a hand it then to standard speak_dialog. Not only entity name is normalized.

Type of PR

Testing

New unittests are present for a new functions.

Documentation

All new functions have a basic informaition in docstrings.

Tony763 commented 1 year ago

Hi @stratus-ss , no problem, as You are now only as community, I expect a delays in handling PRs :slightly_smiling_face: Conflict are solved.