Rename zwave_mqtt to ozw (#35631)

This commit is contained in:
Franck Nijhof authored and GitHub committed 2020-05-14 22:56:04 +02:00
1 parent 626f72b97a
commit 0be20ec6ab
54 files changed
+67 -78

No files matched your search

@@ -1,4 +1,4 @@
"""The zwave_mqtt integration."""
"""The ozw integration."""
import asyncio
import json
import logging
@@ -43,7 +43,7 @@ DATA_DEVICES = "zwave-mqtt-devices"
async def async_setup(hass: HomeAssistant, config: dict):
"""Initialize basic config of zwave_mqtt component."""
"""Initialize basic config of ozw component."""
if "mqtt" not in hass.config.components:
_LOGGER.error("MQTT integration is not set up")
return False
@@ -52,9 +52,9 @@ async def async_setup(hass: HomeAssistant, config: dict):
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
"""Set up zwave_mqtt from a config entry."""
zwave_mqtt_data = hass.data[DOMAIN][entry.entry_id] = {}
zwave_mqtt_data[DATA_UNSUBSCRIBE] = []
"""Set up ozw from a config entry."""
ozw_data = hass.data[DOMAIN][entry.entry_id] = {}
ozw_data[DATA_UNSUBSCRIBE] = []
data_nodes = {}
data_values = {}
@@ -216,7 +216,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
for component in PLATFORMS
]
)
zwave_mqtt_data[DATA_UNSUBSCRIBE].append(
ozw_data[DATA_UNSUBSCRIBE].append(
await mqtt.async_subscribe(
hass, f"{TOPIC_OPENZWAVE}/#", async_receive_message
)
@@ -1,13 +1,13 @@
"""Config flow for zwave_mqtt integration."""
"""Config flow for ozw integration."""
from homeassistant import config_entries
from .const import DOMAIN # pylint:disable=unused-import
TITLE = "Z-Wave MQTT"
TITLE = "OpenZWave"
class DomainConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for zwave_mqtt."""
"""Handle a config flow for ozw."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH
@@ -1,10 +1,10 @@
"""Constants for the zwave_mqtt integration."""
"""Constants for the ozw integration."""
from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR_DOMAIN
from homeassistant.components.light import DOMAIN as LIGHT_DOMAIN
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN
DOMAIN = "zwave_mqtt"
DOMAIN = "ozw"
DATA_UNSUBSCRIBE = "unsubscribe"
PLATFORMS = [BINARY_SENSOR_DOMAIN, LIGHT_DOMAIN, SENSOR_DOMAIN, SWITCH_DOMAIN]
@@ -0,0 +1,9 @@
{
"domain": "ozw",
"name": "OpenZWave (beta)",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/ozw",
"requirements": ["python-openzwave-mqtt==1.0.1"],
"after_dependencies": ["mqtt"],
"codeowners": ["@cgarwood", "@marcelveldt", "@MartinHjelmare"]
}
@@ -1,5 +1,4 @@
{
"title": "Z-Wave over MQTT",
"config": {
"step": {
"user": {
@@ -1,17 +0,0 @@
{
"domain": "zwave_mqtt",
"name": "Z-Wave over MQTT",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/zwave_mqtt",
"requirements": [
"python-openzwave-mqtt==1.0.1"
],
"after_dependencies": [
"mqtt"
],
"codeowners": [
"@cgarwood",
"@marcelveldt",
"@MartinHjelmare"
]
}