8000 Add switch to MQTT discovery by fabaff · Pull Request #6733 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add switch to MQTT discovery #6733

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

Merged
merged 1 commit into from
Mar 26, 2017
Merged

Add switch to MQTT discovery #6733

merged 1 commit into from
Mar 26, 2017

Conversation

fabaff
Copy link
Member
@fabaff fabaff commented Mar 21, 2017

Description:

Enables the discovery of MQTT switches.

Setting up a switch.

$ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/switch/irrigation/config" \
  -m '{"name": "garden", "command_topic": "homeassistant/switch/irrigation/set"}'

Set the state.

$ mosquitto_pub -h 127.0.0.1 -p 1883 -t "homeassistant/switch/irrigation/set" -m ON

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#2312

Example entry for configuration.yaml (if applicable):

mqtt:
  discovery: true

Checklist:

If user exposed functionality or configuration variables are added/changed:

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass

@mention-bot
Copy link

@fabaff, thanks for your PR! By analyzing the history of the files in this pull request, we identified @sfam, @pvizeli and @balloob to be potential reviewers.

@robbiet480
Copy link
Member

We might as well just add every component that has an MQTT platform to MQTT discovery, no?

@fabaff
Copy link
Member Author
fabaff commented Mar 21, 2017

We could do that. Doing it one by one allows me to do at least some basic testing.

@fabaff fabaff closed this Mar 24, 2017
@fabaff fabaff reopened this Mar 24, 2017
@fabaff fabaff merged commit 22b28d8 into home-assistant:dev Mar 26, 2017
@fabaff fabaff deleted the mqtt-discovery-switch branch March 26, 2017 13:48
@fabaff fabaff mentioned this pull request Apr 6, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Jul 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0