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

Reconfigure MQTT climate component if discovery info is changed #18174

Merged

Conversation

emontnemery
Copy link
Contributor

@emontnemery emontnemery commented Nov 4, 2018

Description:

Reconfigure MQTT climate component if discovery info is changed.
This PR is an extension of #18169 which introduced support for reconfiguring MQTT binary sensors.

(This is bullet 2 in home-assistant/architecture#70)

PRs for other platforms will be opened separately.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox.
  • Tests have been added to verify that the new code works.

@emontnemery emontnemery requested a review from a team as a code owner November 4, 2018 00:12
@ghost ghost added the in progress label Nov 4, 2018
@emontnemery emontnemery changed the title Recreate climate component if discovery info is changed WIP - Recreate climate component if discovery info is changed Nov 4, 2018
@emontnemery emontnemery force-pushed the mqtt_discovery_update_climate branch from f306a44 to c94c936 Compare November 20, 2018 18:46
@ghost ghost assigned emontnemery Nov 20, 2018
@emontnemery emontnemery force-pushed the mqtt_discovery_update_climate branch from c94c936 to 831729d Compare November 20, 2018 18:47
@emontnemery emontnemery changed the title WIP - Recreate climate component if discovery info is changed Reconfigure MQTT climate component if discovery info is changed Nov 20, 2018
@emontnemery
Copy link
Contributor Author

@OttoWinter, @balloob You reviewed #18169, do you think this one is OK too?

CONF_CURRENT_TEMPERATURE_TOPIC
)
}
self._qos = config.get(CONF_QOS)
Copy link
Member

Choose a reason for hiding this comment

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

I sometimes wonder if we should not just store config instead of every variable if we're going to just copy the value? Wouldn't that greatly clean up the code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good point actually!

@ghost ghost removed the platform: climate.mqtt label Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants