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
Update mqtt_eventstream.py #14923
Conversation
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
@@ -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) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blank line contains whitespace
What was the reason behind this line when it was added? |
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. |
There was a problem hiding this 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.
There was a problem hiding this 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.
* 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
Remove a line setting an internal state
mqtt_eventstream.initialized
toTrue
since: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:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices: