Conversation
|
One thing that I don't like about this approach is that we show the config info before the user confirms that they want to set it up. Would be better once they hit submit, however, we don't currently support showing a message when a config entry has been created. |
|
We should also abort if the host is a local IP address |
homeassistant/components/webhook.py
Outdated
| @bind_hass | ||
| def async_register(hass, webhook_id, handler): | ||
| """Register a webhook.""" | ||
| handlers = hass.data.setdefault(webhook_id, {}) |
There was a problem hiding this comment.
Why do we need a dict to store the handler when each webhook id will only get one handler?
There was a problem hiding this comment.
ugh that is a mistake, that should have been DOMAIN.
There was a problem hiding this comment.
(still need to write tests)
tests/components/ifttt/test_init.py
Outdated
| }) | ||
| assert result['type'] == data_entry_flow.RESULT_TYPE_FORM, result | ||
|
|
||
| result = await hass.config_entries.flow.async_configure(result['flow_id'], {}) |
There was a problem hiding this comment.
line too long (82 > 79 characters)
|
Tests added, this is ready for review. |
|
CC @dgomes I think that the webhook component is what the push camera could use too. |
|
Sure thing, I'm currently a bit overwhelmed at work but will issue a PR with this ASAP |

Description:
This adds a new webhook component as proposed in home-assistant/architecture#80
To test it, I have updated the IFTTT component with a config flow to register a webhook.
If we like architecture, I can add tests.Tests addedPull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>
Checklist:
tox. Your PR cannot be merged unless tests passIf the code does not interact with devices: