Rename zwave_mqtt to ozw (#35631)

This commit is contained in:
Franck Nijhof 2020-05-14 22:56:04 +02:00 committed by GitHub
parent 626f72b97a
commit 0be20ec6ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 67 additions and 78 deletions

View file

@ -0,0 +1,24 @@
"""Config flow for ozw integration."""
from homeassistant import config_entries
from .const import DOMAIN # pylint:disable=unused-import
TITLE = "OpenZWave"
class DomainConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for ozw."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH
async def async_step_user(self, user_input=None):
"""Handle the initial step."""
if self._async_current_entries():
return self.async_abort(reason="one_instance_allowed")
if "mqtt" not in self.hass.config.components:
return self.async_abort(reason="mqtt_required")
if user_input is not None:
return self.async_create_entry(title=TITLE, data={})
return self.async_show_form(step_id="user")