'Test vacuum supported features.'

def test_supported_features(self):

    state = self.hass.states.get(ENTITY_VACUUM_COMPLETE)
    self.assertEqual(2047, state.attributes.get(ATTR_SUPPORTED_FEATURES))
    self.assertEqual('Charging', state.attributes.get(ATTR_STATUS))
    self.assertEqual(100, state.attributes.get(ATTR_BATTERY_LEVEL))
    self.assertEqual('medium', state.attributes.get(ATTR_FAN_SPEED))
    self.assertListEqual(FAN_SPEEDS, state.attributes.get(ATTR_FAN_SPEED_LIST))
    self.assertEqual(STATE_OFF, state.state)
    state = self.hass.states.get(ENTITY_VACUUM_MOST)
    self.assertEqual(219, state.attributes.get(ATTR_SUPPORTED_FEATURES))
    self.assertEqual('Charging', state.attributes.get(ATTR_STATUS))
    self.assertEqual(100, state.attributes.get(ATTR_BATTERY_LEVEL))
    self.assertEqual(None, state.attributes.get(ATTR_FAN_SPEED))
    self.assertEqual(None, state.attributes.get(ATTR_FAN_SPEED_LIST))
    self.assertEqual(STATE_OFF, state.state)
    state = self.hass.states.get(ENTITY_VACUUM_BASIC)
    self.assertEqual(195, state.attributes.get(ATTR_SUPPORTED_FEATURES))
    self.assertEqual('Charging', state.attributes.get(ATTR_STATUS))
    self.assertEqual(100, state.attributes.get(ATTR_BATTERY_LEVEL))
    self.assertEqual(None, state.attributes.get(ATTR_FAN_SPEED))
    self.assertEqual(None, state.attributes.get(ATTR_FAN_SPEED_LIST))
    self.assertEqual(STATE_OFF, state.state)
    state = self.hass.states.get(ENTITY_VACUUM_MINIMAL)
    self.assertEqual(3, state.attributes.get(ATTR_SUPPORTED_FEATURES))
    self.assertEqual(None, state.attributes.get(ATTR_STATUS))
    self.assertEqual(None, state.attributes.get(ATTR_BATTERY_LEVEL))
    self.assertEqual(None, state.attributes.get(ATTR_FAN_SPEED))
    self.assertEqual(None, state.attributes.get(ATTR_FAN_SPEED_LIST))
    self.assertEqual(STATE_OFF, state.state)
    state = self.hass.states.get(ENTITY_VACUUM_NONE)
    self.assertEqual(0, state.attributes.get(ATTR_SUPPORTED_FEATURES))
    self.assertEqual(None, state.attributes.get(ATTR_STATUS))
    self.assertEqual(None, state.attributes.get(ATTR_BATTERY_LEVEL))
    self.assertEqual(None, state.attributes.get(ATTR_FAN_SPEED))
    self.assertEqual(None, state.attributes.get(ATTR_FAN_SPEED_LIST))
    self.assertEqual(STATE_OFF, state.state)
