Skip to content
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

Update mqtt_eventstream.py #14923

Merged
merged 2 commits into from Jun 11, 2018
Merged

Update mqtt_eventstream.py #14923

merged 2 commits into from Jun 11, 2018

Conversation

molobrakos
Copy link
Contributor

Remove a line setting an internal state mqtt_eventstream.initialized to True since:

  1. No other platform is doing this
  2. This will create an annoying entity/item in the user interface which the user will have to explicitly hide

Description:

Related issue (if applicable): fixes #

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

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

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

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

Remove a line setting an internal state mqtt_eventstream.initialized to True since:
1. No other platform is doing this
2. This will create an annoying entity/item in the user interface which the user will have to explicitly hide
@ghost ghost assigned molobrakos Jun 11, 2018
@ghost ghost added in progress and removed small-pr PRs with less than 30 lines. labels Jun 11, 2018
@@ -115,6 +115,5 @@ def _event_receiver(topic, payload, qos):
# Only subscribe if you specified a topic.
if sub_topic:
yield from mqtt.async_subscribe(sub_topic, _event_receiver)

hass.states.async_set('{domain}.initialized'.format(domain=DOMAIN), True)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

@MartinHjelmare
Copy link
Member

MartinHjelmare commented Jun 11, 2018

What was the reason behind this line when it was added?

@molobrakos
Copy link
Contributor Author

molobrakos commented Jun 11, 2018

Seems like it has been in place since the component was created: 8ace656#diff-c847158c00eebfb12ba4f2a8e0927aaeR93

I would guess it was once used for debugging and then forgotten.

Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but I'm not using this component. Would be good with another comment.

Copy link
Member

@fabaff fabaff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with remove this. Looks like that it was introduced because one of the examples served as a boilerplate contained it.

@fabaff fabaff merged commit 576c806 into dev Jun 11, 2018
@ghost ghost removed the in progress label Jun 11, 2018
@fabaff fabaff deleted the molobrakos-patch-1 branch June 11, 2018 13:29
@balloob balloob mentioned this pull request Jun 22, 2018
girlpunk pushed a commit to girlpunk/home-assistant that referenced this pull request Sep 4, 2018
* Update mqtt_eventstream.py

Remove a line setting an internal state mqtt_eventstream.initialized to True since:
1. No other platform is doing this
2. This will create an annoying entity/item in the user interface which the user will have to explicitly hide

* Update mqtt_eventstream.py
@home-assistant home-assistant locked and limited conversation to collaborators Dec 10, 2018
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.

None yet

5 participants