New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Hass.io discovery feature for Add-ons #17035

Merged
merged 57 commits into from Oct 3, 2018

Conversation

Projects
None yet
4 participants
@pvizeli
Member

pvizeli commented Oct 1, 2018

Description:

Allow Add-on to setup/remove components/platforms on Home Assistant with Hass.io discovery API.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

pvizeli added some commits Sep 27, 2018

})
await hass.async_start()

This comment has been minimized.

@houndci-bot

houndci-bot Oct 2, 2018

blank line at end of file
blank line contains whitespace

"http://127.0.0.1/addons/mosquitto/info", json={
'result': 'ok', 'data': {'name': "Mosquitto Test"}
})

This comment has been minimized.

@houndci-bot

houndci-bot Oct 2, 2018

blank line contains whitespace

'result': 'ok', 'data': {'discovery': [
{
"service": "mqtt", "uuid": "test",
"addon", "mosquitto", "config":

This comment has been minimized.

@houndci-bot

houndci-bot Oct 2, 2018

SyntaxError: invalid syntax
trailing whitespace

Show resolved Hide resolved tests/components/hassio/test_discovery.py Outdated

pvizeli added some commits Oct 2, 2018

'result': 'ok', 'data': {'discovery': [
{
"service": "mqtt", "uuid": "test",
"addon", "mosquitto", "config":

This comment has been minimized.

@houndci-bot

houndci-bot Oct 2, 2018

SyntaxError: invalid syntax

pvizeli added some commits Oct 2, 2018

@pvizeli pvizeli changed the title from WIP: Add support for Hass.io discovery feature for Add-ons to Add support for Hass.io discovery feature for Add-ons Oct 2, 2018

pvizeli added some commits Oct 3, 2018

except HassioAPIError as err:
_LOGGER.error("Can't read add-on info: %s", err)
return
data[ATTR_ADDON] = addon_info[ATTR_NAME]

This comment has been minimized.

@balloob

balloob Oct 3, 2018

Member

this is not being used? You're passing config_data as data to flow init.

assert aioclient_mock.call_count == 2
assert mock_mqtt.called
mock_mqtt.assert_called_with({
'broker': 'mock-broker', 'port': 1883, 'username': 'mock-user',

This comment has been minimized.

@balloob

balloob Oct 3, 2018

Member

Misses addon key.

@balloob

balloob approved these changes Oct 3, 2018

Ok to merge when addon name is passed in.

balloob added some commits Oct 3, 2018

assert mock_mqtt.called
mock_mqtt.assert_called_with({
'broker': 'mock-broker', 'port': 1883, 'username': 'mock-user',
'password': 'mock-pass', 'protocol': '3.1.1', 'addon': 'Mosquitto Test',

This comment has been minimized.

@houndci-bot

houndci-bot Oct 3, 2018

line too long (84 > 79 characters)

assert mock_mqtt.called
mock_mqtt.assert_called_with({
'broker': 'mock-broker', 'port': 1883, 'username': 'mock-user',
'password': 'mock-pass', 'protocol': '3.1.1', 'addon': 'Mosquitto Test',

This comment has been minimized.

@houndci-bot

houndci-bot Oct 3, 2018

line too long (84 > 79 characters)

pvizeli and others added some commits Oct 3, 2018

@pvizeli pvizeli merged commit 704c9d8 into dev Oct 3, 2018

6 checks passed

Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 93.683%
Details

@wafflebot wafflebot bot removed the in progress label Oct 3, 2018

@fabaff fabaff deleted the hassio-discovery branch Oct 3, 2018

@balloob balloob removed the new-platform label Oct 5, 2018

@balloob balloob referenced this pull request Oct 12, 2018

Merged

0.80.0 #17361

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment