From 071ffa7df2ec8aff7845ffeda4e498332ef716ab Mon Sep 17 00:00:00 2001 From: Stephane Rosi Philouze Date: Mon, 7 May 2018 00:10:39 +0200 Subject: [PATCH 1/3] Add help for conversation/process service --- homeassistant/components/services.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/homeassistant/components/services.yaml b/homeassistant/components/services.yaml index 746c3c7f4838fa..25549c05d360c9 100644 --- a/homeassistant/components/services.yaml +++ b/homeassistant/components/services.yaml @@ -1,5 +1,13 @@ # Describes the format for available component services +conversation: + process: + description: Launch a conversation from a transcribed text. + fields: + text: + description: Transcribed text + example: 'Switch all lights on' + foursquare: checkin: description: Check a user into a Foursquare venue. From f59c2e83b0b70e1c423c57dff1398cc7069a1411 Mon Sep 17 00:00:00 2001 From: Stephane Rosi Philouze Date: Mon, 7 May 2018 12:56:22 +0200 Subject: [PATCH 2/3] Add logging to debug text received when service is called --- homeassistant/components/conversation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/components/conversation.py b/homeassistant/components/conversation.py index ddd96c99177d7e..9cb00a84583ae5 100644 --- a/homeassistant/components/conversation.py +++ b/homeassistant/components/conversation.py @@ -96,6 +96,7 @@ async def async_setup(hass, config): async def process(service): """Parse text into commands.""" text = service.data[ATTR_TEXT] + _LOGGER.debug('Processing: <%s>', text) try: await _process(hass, text) except intent.IntentHandleError as err: From c427a030aa713070f45ab44a435b8ea6d684a962 Mon Sep 17 00:00:00 2001 From: Stephane Rosi Philouze Date: Tue, 8 May 2018 01:43:39 +0200 Subject: [PATCH 3/3] Move conversation to specific folder --- .../{conversation.py => conversation/__init__.py} | 0 homeassistant/components/conversation/services.yaml | 10 ++++++++++ homeassistant/components/services.yaml | 8 -------- 3 files changed, 10 insertions(+), 8 deletions(-) rename homeassistant/components/{conversation.py => conversation/__init__.py} (100%) create mode 100644 homeassistant/components/conversation/services.yaml diff --git a/homeassistant/components/conversation.py b/homeassistant/components/conversation/__init__.py similarity index 100% rename from homeassistant/components/conversation.py rename to homeassistant/components/conversation/__init__.py diff --git a/homeassistant/components/conversation/services.yaml b/homeassistant/components/conversation/services.yaml new file mode 100644 index 00000000000000..a1b980d8e05a3d --- /dev/null +++ b/homeassistant/components/conversation/services.yaml @@ -0,0 +1,10 @@ +# Describes the format for available component services + +process: + description: Launch a conversation from a transcribed text. + fields: + text: + description: Transcribed text + example: Turn all lights on + + diff --git a/homeassistant/components/services.yaml b/homeassistant/components/services.yaml index 25549c05d360c9..746c3c7f4838fa 100644 --- a/homeassistant/components/services.yaml +++ b/homeassistant/components/services.yaml @@ -1,13 +1,5 @@ # Describes the format for available component services -conversation: - process: - description: Launch a conversation from a transcribed text. - fields: - text: - description: Transcribed text - example: 'Switch all lights on' - foursquare: checkin: description: Check a user into a Foursquare venue.