{"action":"created","issue":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/18411","repository_url":"https://api.github.com/repos/home-assistant/home-assistant","labels_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/18411/labels{/name}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/18411/comments","events_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/18411/events","html_url":"https://github.com/home-assistant/home-assistant/issues/18411","id":379937788,"node_id":"MDU6SXNzdWUzNzk5Mzc3ODg=","number":18411,"title":"Dialogflow not working with webhooks","user":{"login":"timmo001","id":28114703,"node_id":"MDQ6VXNlcjI4MTE0NzAz","avatar_url":"https://avatars3.githubusercontent.com/u/28114703?v=4","gravatar_id":"","url":"https://api.github.com/users/timmo001","html_url":"https://github.com/timmo001","followers_url":"https://api.github.com/users/timmo001/followers","following_url":"https://api.github.com/users/timmo001/following{/other_user}","gists_url":"https://api.github.com/users/timmo001/gists{/gist_id}","starred_url":"https://api.github.com/users/timmo001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timmo001/subscriptions","organizations_url":"https://api.github.com/users/timmo001/orgs","repos_url":"https://api.github.com/users/timmo001/repos","events_url":"https://api.github.com/users/timmo001/events{/privacy}","received_events_url":"https://api.github.com/users/timmo001/received_events","type":"User","site_admin":false},"labels":[{"id":726576664,"node_id":"MDU6TGFiZWw3MjY1NzY2NjQ=","url":"https://api.github.com/repos/home-assistant/home-assistant/labels/component:%20dialogflow","name":"component: dialogflow","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-12T20:21:54Z","updated_at":"2018-11-14T12:15:05Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Home Assistant release with the issue:**\r\n\r\n0.82.0\r\n\r\n**Operating environment (Hass.io/Docker/Windows/etc.):**\r\n\r\nHass.io\r\n\r\n**Component/platform:**\r\n\r\nhttps://www.home-assistant.io/components/dialogflow/\r\n\r\n**Description of problem:**\r\n\r\n![image](https://user-images.githubusercontent.com/28114703/48373302-58ec0080-e6b9-11e8-84b9-56c462298c19.png)\r\n\r\nDialogflow is not working with webhooks. I have used the integrations panel to get a webhook, added it to the `Fulfillment` section of Dialogflow, saved etc. but the error below is always produced.\r\n\r\n**Problem-relevant `configuration.yaml` entries and (fill out even if it seems unimportant):**\r\n```yaml\r\ndialogflow:\r\n\r\nintent_script:\r\n  DownstairsTemperature:\r\n    speech:\r\n      text: The temperature downstairs is {{ states('sensor.dht22_01_temperature') }} degrees\r\n```\r\n\r\n**Traceback (if applicable):**\r\n```\r\n2018-11-12 20:01:04 ERROR (MainThread) [homeassistant.components.webhook] Error processing webhook OBFUSCATED\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.6/site-packages/homeassistant/components/webhook.py\", line 79, in post\r\n    response = await handler(hass, webhook_id, request)\r\n  File \"/usr/local/lib/python3.6/site-packages/homeassistant/components/dialogflow/__init__.py\", line 43, in handle_webhook\r\n    response = await async_handle_message(hass, message)\r\n  File \"/usr/local/lib/python3.6/site-packages/homeassistant/components/dialogflow/__init__.py\", line 108, in async_handle_message\r\n    action_incomplete = req['actionIncomplete']\r\nTypeError: 'NoneType' object is not subscriptable\r\n```\r\n\r\n![image](https://user-images.githubusercontent.com/28114703/48372251-f8a78f80-e6b5-11e8-94d4-c76ee57ff9e7.png)\r\n![image](https://user-images.githubusercontent.com/28114703/48372599-fabe1e00-e6b6-11e8-953b-4d5f3fcfd1fe.png)\r\n\r\n**Additional Information**\r\n\r\nThe line it is pointing to is here:\r\n\r\nhttps://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/dialogflow/__init__.py#L108\r\n\r\nand looking at the response in dialogflow, `actionIncomplete` does not exist:\r\n\r\n```json\r\n{\r\n  \"responseId\": \"OBFUSCATED\",\r\n  \"queryResult\": {\r\n    \"queryText\": \"whats the temperature\",\r\n    \"action\": \"DownstairsTemperature\",\r\n    \"parameters\": {},\r\n    \"allRequiredParamsPresent\": true,\r\n    \"fulfillmentText\": \"Sorry but I cannot connect to your Home Assistant\",\r\n    \"fulfillmentMessages\": [\r\n      {\r\n        \"text\": {\r\n          \"text\": [\r\n            \"Sorry but I cannot connect to your Home Assistant\"\r\n          ]\r\n        }\r\n      }\r\n    ],\r\n    \"intent\": {\r\n      \"name\": \"projects/timmoland-84d69/agent/intents/OBFUSCATED\",\r\n      \"displayName\": \"DownstairsTemperature\"\r\n    },\r\n    \"intentDetectionConfidence\": 1,\r\n    \"languageCode\": \"en\"\r\n  },\r\n  \"originalDetectIntentRequest\": {\r\n    \"payload\": {}\r\n  },\r\n  \"session\": \"projects/timmoland-84d69/agent/sessions/OBFUSCATED\"\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/comments/438642025","html_url":"https://github.com/home-assistant/home-assistant/issues/18411#issuecomment-438642025","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/18411","id":438642025,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODY0MjAyNQ==","user":{"login":"timmo001","id":28114703,"node_id":"MDQ6VXNlcjI4MTE0NzAz","avatar_url":"https://avatars3.githubusercontent.com/u/28114703?v=4","gravatar_id":"","url":"https://api.github.com/users/timmo001","html_url":"https://github.com/timmo001","followers_url":"https://api.github.com/users/timmo001/followers","following_url":"https://api.github.com/users/timmo001/following{/other_user}","gists_url":"https://api.github.com/users/timmo001/gists{/gist_id}","starred_url":"https://api.github.com/users/timmo001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timmo001/subscriptions","organizations_url":"https://api.github.com/users/timmo001/orgs","repos_url":"https://api.github.com/users/timmo001/repos","events_url":"https://api.github.com/users/timmo001/events{/privacy}","received_events_url":"https://api.github.com/users/timmo001/received_events","type":"User","site_admin":false},"created_at":"2018-11-14T12:15:05Z","updated_at":"2018-11-14T12:15:05Z","author_association":"CONTRIBUTOR","body":"Thanks @boggiano. That worked. Perhaps we should upgrade the library or at least update the docs since they are pretty out of date with Dialogflow's new UI"}}
{"actor":{"display_login":"timmo001"}}