Skip to content

Commit

Permalink
renamed statevacuum to state.
Browse files Browse the repository at this point in the history
  • Loading branch information
pszafer committed Apr 20, 2019
1 parent 9864995 commit 6db91cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/mqtt/vacuum/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
12 changes: 6 additions & 6 deletions tests/components/mqtt/test_state_vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -397,7 +397,7 @@ async def test_discovery_removal_vacuum(hass, mock_publish):
data = (
'{ "name": "Beer",'
' "command_topic": "test_topic",'
' "component": "statevacuum" }'
' "component": "state" }'
)

async_fire_mqtt_message(hass, 'homeassistant/vacuum/bla/config',
Expand Down Expand Up @@ -425,12 +425,12 @@ async def test_discovery_broken(hass, mqtt_mock, caplog):
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',
Expand Down Expand Up @@ -460,12 +460,12 @@ async def test_discovery_update_vacuum(hass, mock_publish):
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',
Expand Down

0 comments on commit 6db91cd

Please sign in to comment.