Skip to content
Permalink
Browse files

renamed statevacuum to state.

  • Loading branch information...
pszafer committed Apr 20, 2019
1 parent 9864995 commit 6db91cd422538843284ac65a37d11ae1f6e4d5ce
Showing with 8 additions and 8 deletions.
  1. +2 −2 homeassistant/components/mqtt/vacuum/__init__.py
  2. +6 −6 tests/components/mqtt/test_state_vacuum.py
@@ -51,8 +51,8 @@ def strings_to_services(strings, string_to_service):


MQTT_VACUUM_SCHEMA = vol.Schema({
vol.Optional(CONF_COMPONENT, default='legacy'): vol.All(
vol.Lower, vol.Any('legacy', 'statevacuum'))
vol.Optional(CONF_COMPONENT, default=LEGACY): vol.All(
vol.Lower, vol.Any(LEGACY, STATE))
})

PLATFORM_SCHEMA = vol.All(MQTT_VACUUM_SCHEMA.extend({
@@ -29,7 +29,7 @@

DEFAULT_CONFIG = {
CONF_PLATFORM: 'mqtt',
CONF_COMPONENT: 'statevacuum',
CONF_COMPONENT: 'state',
CONF_NAME: 'mqtttest',
CONF_COMMAND_TOPIC: COMMAND_TOPIC,
mqttvacuum.CONF_SEND_COMMAND_TOPIC: SEND_COMMAND_TOPIC,
@@ -397,7 +397,7 @@ def mock_publish(hass):
data = (
'{ "name": "Beer",'
' "command_topic": "test_topic",'
' "component": "statevacuum" }'
' "component": "state" }'
)

async_fire_mqtt_message(hass, 'homeassistant/vacuum/bla/config',
@@ -425,12 +425,12 @@ def mock_publish(hass):
data1 = (
'{ "name": "Beer",'
' "command_topic": "test_topic#",'
' "component": "statevacuum" }'
' "component": "state" }'
)
data2 = (
'{ "name": "Milk",'
' "command_topic": "test_topic",'
' "component": "statevacuum" }'
' "component": "state" }'
)

async_fire_mqtt_message(hass, 'homeassistant/vacuum/bla/config',
@@ -460,12 +460,12 @@ def mock_publish(hass):
data1 = (
'{ "name": "Beer",'
' "command_topic": "test_topic",'
'"component": "statevacuum" }'
'"component": "state" }'
)
data2 = (
'{ "name": "Milk",'
' "command_topic": "test_topic",'
' "component": "statevacuum"}'
' "component": "state"}'
)

async_fire_mqtt_message(hass, 'homeassistant/vacuum/bla/config',

0 comments on commit 6db91cd

Please sign in to comment.
You can’t perform that action at this time.